<template>
	<view class="home">
		<u-sticky offset-top="0">
			<view class="tophead">
				<uni-icons type="left" color="#666" size="26" @click="retFn"></uni-icons>
				<view class="">
					索道式测流车
				</view>
				<view class="" style="width: 100rpx;display: flex;justify-content: flex-end;align-items: center;">
					<view class="" style="margin-right: 20rpx;">
						<uni-icons type="calendar" color="#000000" size="26" @click="flowRecordingFn"></uni-icons>
					</view>
					<view class="" style="margin-right: 20rpx;">
						<uni-icons type="gear-filled" color="#000000" size="26" @click="allocationFn"></uni-icons>
					</view>
				</view>
			</view>
		</u-sticky>
		<!-- 内容 -->
		<view class="concent_box">
			<view class="inibox">
				<view class="inibox_but" hover-class="inibox_acv" @click="iniIFFn">
					设备初始化
				</view>
				<view class="inibox_in">
					<view class="inibox_tt_a" hover-class="inibox_ttacv" @click="tobelFn" v-if="lanname == ''">点击连接设备
					</view>
					<view class="inibox_tt_b" hover-class="inibox_ttacv" @click="lampRFn" v-if="lanname != ''">点击断开设备
					</view>
				</view>
			</view>
			<!-- 故障灯 -->
			<!-- <view class="" style="background-color: #000000;padding: 10rpx;border-radius: 20rpx;"> -->
			<!-- 			<view class="lamp" v-if="lanname != ''">
				<view class="lamp_l">

				</view>
				<view class="element_box">
					<u-line-progress height="8" :showText="false" :percentage="percentage" :activeColor="activeColor"
						:inactiveColor="inactiveColor">
					</u-line-progress>
				</view>
				<view class="lamp_r">

				</view>
			</view> -->
			<!-- 			<view class="lamp_a" v-if="lanname == ''">
				<view class="lamp_l_a">

				</view>
				<view class="element_box">
					<u-line-progress height="8" :showText="false" :percentage="percentage" :activeColor="activeColor"
						:inactiveColor="inactiveColor">
					</u-line-progress>
				</view>
				<view class="lamp_r_a">

				</view>
			</view> -->
			<!-- </view> -->
			<!-- 圈数 -->
			<view class="real_box">
				<view class="real_flx">
					<view class="real_l">
						<view class="buttn">
							<image class="img" src="@/static/hengx.png" mode=""></image>
						</view>
					</view>
					<view class="real_r">
						<view class="real_tex">
							当前：{{xxNubAc}}
						</view>
					</view>
					<view class="real_r_r">
						<view class="real_tex">
							测线{{measuringXX.name}}：{{measuringXX.nub}}
						</view>
					</view>
				</view>
			</view>
			<view class="real_box">
				<view class="real_flx">
					<view class="real_l_a">
						<view class="buttn">
							<image class="img" src="@/static/zongx.png" mode=""></image>
						</view>
					</view>
					<view class="real_r_a">
						<view class="real_tex">
							当前：{{yyNubAc}}
						</view>
					</view>
					<view class="real_r_r">
						<view class="real_tex">
							测点{{measuringYY.name}}：{{measuringYY.nub}}
						</view>
					</view>
				</view>
			</view>
			<!-- <button @click="calculateFlow">测试</button> -->
			<!-- 遥控器 -->
			<view class="remoteControlUnit">
				<view class="con_box">
					<view class="top_b" hover-class="acv_b" @click="riseDevFn">
						<u-icon name="arrow-up-fill" :color="icColor" size="50"></u-icon>
					</view>
					<view class="com_b">
						<view class="coe_r" hover-class="acv_b" @click="reversalFn">
							<u-icon name="play-left-fill" :color="icColor" size="50"></u-icon>
						</view>
						<view class="cen_box" hover-class="cen_avc" @click="aLLBrakeFn">
							暂停
						</view>
						<view class="coe_r" hover-class="acv_b" @click="forwordFn">
							<u-icon name="play-right-fill" :color="icColor" size="50"></u-icon>
						</view>
					</view>
					<view class="bom_b" hover-class="acv_b" @click="inwaterFn">
						<u-icon name="arrow-down-fill" :color="icColor" size="50"></u-icon>
					</view>
				</view>
			</view>
			<view class="realtime">
				<view class="i_a" style="color: #dd5e04;">
					当前水深：
				</view>
				<view class="i_b" style="color: #ff6923;">
					{{wD}}
				</view>
				<view class="" style="width: 120rpx;">
					<u-button class="buty" type="success" text="修改" @click="allocationFn"></u-button>
				</view>
			</view>
			<view class="" style="margin: 20rpx;">
				<u-button size="large" @click="startMeasuringFn" type="warning" shape="circle" text="开始测量"></u-button>
			</view>
		</view>
		<!-- 弹出弹出层 -->
		<!-- <u-popup :show="showpop" mode="left"> -->
		<u-popup :show="showpop" mode="left">
			<view class="classpop">
				<view class="classpop_tit">
					配 置 测 量 参 数
				</view>
				<view class="conpop">
					<view class="popitem">
						<view class="poptext">
							当前水深：
						</view>
						<view class="poptext_inpp">
							<u--input :fontSize='fontSize' clearable type="number" placeholder="输入水深" border="surround"
								v-model="cfgCeZhan.depthOfWater" @change="chanWdInput"></u--input>
							<u-button class="buty" type="success" text="获取" @click="acquireFnBut"></u-button>
						</view>

					</view>
					<view class="popitem">
						<view class="poptext">
							A点测深：
						</view>
						<view class="poptext_flx">
							<view class="tex_l">{{cfgCeZhan.thoroughH.a}}</view>
							<view class="tex_r">0.2h</view>
						</view>
					</view>
					<view class="popitem">
						<view class="poptext">
							B点测深：
						</view>
						<view class="poptext_flx">

							<view class="tex_l">{{cfgCeZhan.thoroughH.b}}</view>
							<view class="tex_r">0.6h</view>
						</view>
					</view>
					<view class="popitem">
						<view class="poptext">
							C点测深：
						</view>
						<view class="poptext_flx">

							<view class="tex_l">{{cfgCeZhan.thoroughH.c}}</view>
							<view class="tex_r">0.8h</view>
						</view>
					</view>
					<view class="popitem">
						<view class="poptext_a">
							流速仪距铅鱼底：
						</view>
						<view class="" style="background-color: #daeaf3;color: #000000;padding: 5rpx;width: 140rpx;text-align: center;font-size: 50rpx;border-radius: 10rpx;">
							{{cezhanQk}}
						</view>
<!-- 						<u--input :fontSize='fontSize' clearable type="number" placeholder="输入铅鱼距离差" border="surround"
							v-model="cfgCeZhan.rangeDifference"></u--input> -->
					</view>
					<view class="jiag_tier">
						流速仪架空高度
					</view>
					<!-- 架空高 -->
					<view class="jiag_box">
						<view class="jiag_it">
							测线
						</view>
						<view class="jiag_it">
							坐标
						</view>
						<view class="jiag_it">
							走距
						</view>
						<view class="jiag_it">
							距渠底
						</view>
						<view class="jiag_it">
							距水面
						</view>
					</view>
					<view class="jiag_flx" v-for="(i,index) in jiakong" :key="index">
						<view class="jiag_fnub">
							{{i.id}}
						</view>
						<view class="jiag_fnub">
							{{i.cR}}
						</view>
						<view class="jiag_fnub">
							{{i.zJ}}
						</view>
						<view class="jiag_fnub">
							{{i.bC}}
						</view>
						<view class="jiag_fnub">
							{{(i.bC*1 - cfgCeZhan.depthOfWater*1).toFixed(2)}}
						</view>
					</view>
					<view class="jiag_tit_fflx">
						<view class="jiag_tit">
							设备出水位置
						</view>
						<u-radio-group v-model="radiovalue1" placement="row">
							<u-radio :customStyle="{margin: '10px'}" v-for="(item, index) in radiolist1" :key="index"
								:label="item.name" :name="item.name">
							</u-radio>
						</u-radio-group>
					</view>
				</view>
			</view>
			<view class="butpop">
				<view class="" style="padding: 30rpx;">
					<u-button @click="confirmFn" type="success" text="确定"></u-button>
				</view>
			</view>
		</u-popup>
		<!-- 测量弹窗 -->
		<!-- <u-popup :show="flowCheckpop" mode="top"> -->
		<u-popup :show="flowCheckpop" mode="top">
			<view class="viewHistory">
				<!-- 圆 -->
				<view class="head_d">
					<view class="yuan_a">
						<view class="nub">
							<text class="yang_texrt">{{timeNub.secStr}}</text>
							<text>.</text>
							<text class="yang_texrt">{{timeNub.msStr}}</text>
						</view>
						<view class="linbox">

						</view>
						<view class="">
							信号时长
							<!-- {{differenceInMilliseconds}} -->
						</view>
					</view>
					<view class="" style="margin-bottom: -30rpx;">
						<view :class="isActive?'yuan_b':'yuan_c'">

						</view>
						<view class="" style="text-align: center;font-size: 50rpx;color: #00ff00;">
							{{measuringXX.name}}{{measuringYY.name}}
						</view>
					</view>

					<view class="yuan_a">
						<view class="nub yang_texrt">
							{{signalNmb}}
						</view>
						<view class="linbox">

						</view>
						<view class="">
							信号数量
						</view>
					</view>
				</view>
				<!-- 时间线条 -->
				<view class="line_cla_box">
					<view class="line_cla">
						<view class="line_a" :style="{height: i/50 + 'rpx'}" v-for="(i,index) in inlineArr"
							:key="index">

						</view>
					</view>
					<!-- 进度条 -->
					<view class="progress_bar">
						<u-line-progress :percentage="percentageNub" height="5" :showText="false"
							:activeColor="actiColor" :inactiveColor="inacteColor" />
					</view>
					<!-- 均匀度 -->
					<view class="junyun">
						<!-- 						<text></text>
						<text class="text">丨</text>
						<text></text> -->
						<view class="junyun_a">
							均匀度：{{evennub}}
						</view>
						<view class="junyun_b">
							点流速：{{liusu}}
						</view>
					</view>
					<view class="" style="display: flex;align-items: center;justify-content: space-between;">
						<u-button class="custom-style" @click="remeasureFn" text="重新测量" :plain="true" shape="circle"
							color='#ffff00'></u-button>
						<view class="" style="width: 40rpx;">

						</view>
						<u-button class="custom-style" @click="confirmflowCheckpopFn" text="返回" :plain="true"
							shape="circle" color='#00ffff'></u-button>
					</view>
				</view>
				<!-- <button @click="sixFn">语音</button> -->
				<!-- <button @click="analogSignalAdd">添加数据</button> -->
				<!-- <button @click="analogSignalNumber">模拟信号</button> -->
				<!-- <button @c32lick="calculatedFlowFn">计算流量</button> -->
				<!-- <button @click="positionMeasuringPoint">测线</button> -->
				<!-- 保存计算 -->
				<!-- <view class="" style="margin-bottom: 50rpx;" v-if="saveIF"> -->
				<view class="" style="margin-bottom: 30rpx;" v-if="saveIF">
					<u-button class="custom-style" @click="holdPointVelocityFn" text="保存点流速" :plain="true"
						shape="circle" color='#00ff00'></u-button>
				</view>

				<view class="" style="margin-bottom: 30rpx;"
					v-if="cexianCounter >= cezhanObj.cexianlist.length * 3 && dianfa == 3">
					<u-button class="custom-style" @click="calculatedFlowFn" text="计算流量" :plain="true" shape="circle"
						color='#00ffff'></u-button>
				</view>
				<view class="" style="margin-bottom: 50rpx;"
					v-if="cexianCounter >= cezhanObj.cexianlist.length && dianfa == 1">
					<u-button class="custom-style" @click="calculatedFlowFn" text="计算流量" :plain="true" shape="circle"
						color='#00ffff'></u-button>
				</view>
				<!-- 测线 -->
				<view class="measuring_box">
					<!-- 3点法 -->
					<view class="box_num" v-if="dianfa == 3">
						<view
							:class="{ 'num_i_acv': i.status == 0,'num_i_box': i.status == 1,'num_i_nue': i.status == 2 }"
							v-for="(i,index) in measuringArr" :key="index">
							<view class="text_bom">

								<view class="text_aaom">
									测线{{index + 1}}
								</view>
								<view class="text_bbom">
									平均流速：{{i.aveTy}}
								</view>
							</view>
							<view class="text_top">
								<view class="text">
									<view class="text_fdlx">
										<view class="text_a">
											{{index+1}}A
										</view>
										<view class="text_b">
											{{i.a.time}}
										</view>
										<view class="text_b">
											{{i.a.nub}}
										</view>
										<view class="text_b">
											{{i.a.evenness}}
										</view>
										<view class="text_c">
											{{i.a.liusu}}
										</view>
									</view>
									<view class="text_fdlx">
										<view class="text_a">
											{{index+1}}B
										</view>
										<view class="text_b">
											{{i.b.time}}
										</view>
										<view class="text_b">
											{{i.b.nub}}
										</view>
										<view class="text_b">
											{{i.b.evenness}}
										</view>
										<view class="text_c">
											{{i.b.liusu}}
										</view>
									</view>
									<view class="text_fdlx">
										<view class="text_a">
											{{index+1}}C
										</view>
										<view class="text_b">
											{{i.c.time}}
										</view>
										<view class="text_b">
											{{i.c.nub}}
										</view>
										<view class="text_b">
											{{i.c.evenness}}
										</view>
										<view class="text_c">
											{{i.c.liusu}}
										</view>
									</view>
								</view>
							</view>

						</view>
					</view>
					<!-- 1点法 -->
					<view class="box_num" v-if="dianfa == 1">
						<view :class="{ 'text_top_dianf': i.status == 1,'text_top_dianf_acv': i.status == 0}"
							v-for="(i,index) in measuringArr" :key="index">
							<view class="text_top">
								<view class="text_a">
									{{index+1}}B
								</view>
								<view class="text_dian_tit">
									<view>{{i.time}}</view>
									<view>{{i.nub}}</view>
									<view>{{i.evenness}}</view>
								</view>
								<view class="text_b">
									{{i.b}}
								</view>
							</view>

						</view>
					</view>
				</view>
			</view>

		</u-popup>
		<!-- 计算流量弹窗 -->
		<u-popup :show="flowRateIF" mode="top">

			<view class="viewHistory_flow_rate">
				<!-- 测线 -->
				<view class="measuringLine">
					<view class="box_num">
						<view class="num_i" v-for="(i,index) in pointVelocity" :key="index">
							<view class="text_top">
								<view class="text">
									<view class="text_a">
										测线流速：
									</view>
									<view class="text_b">
										{{i.liusu}}
									</view>
								</view>
								<view class="text">
									<view class="text_a">
										信号数量：
									</view>
									<view class="text_b">
										{{i.evennub}}
									</view>
								</view>
								<view class="text">
									<view class="text_a">
										信号时长：
									</view>
									<view class="text_b">
										{{i.timeNub}}
									</view>
								</view>
							</view>
							<view class="text_bom">
								{{index + 1}}号测线
							</view>
						</view>
					</view>
					<view class="depth_water">
						<view class="water_a">
							水深：
						</view>
						<view class="water_b">
							<u--input @change="changeInputFn" v-model="wD" fontSize="25" border="none" color="#00ff00"
								placeholder="输入水深" type="digit"></u--input>
							<view class="water_c">
								m
							</view>
						</view>
					</view>
					<view class="depth_water_a">
						<view class="water_a" style="color: #000000;font-size: 60rpx;">
							流量：
						</view>
						<view class="water_b">
							<view class="" style="color: #00ff00;">
								{{liusliangnub}}
							</view>
							<view class="water_c">
								m³/s
							</view>
						</view>
					</view>
				</view>
				<view class="" style="margin-bottom: 30rpx;">
					<u-button class="custom-style" @click="calculateFlow" text="计算流量" :plain="true" shape="circle"
						color='#ffff00'></u-button>
				</view>
<!-- 				<view class="" style="margin-bottom: 30rpx;">
					<u-button class="custom-style" @click="saveTrafficFn" text="保存流量" :plain="true" shape="circle"
						color='#00ff00'></u-button>
				</view> -->
				<u-button class="custom-style" @click="trafficuploadTrafficFn" text="上报数据" :plain="true" shape="circle"
					color='#aaaaff'></u-button>
				<view class="butflx">
					<u-button class="custom-style" @click="hiddenTrafficFn" text="返回" :plain="true" shape="circle"
						color='#00ffff'></u-button>
				</view>
			</view>

		</u-popup>
		<!-- 历史流量 -->
		<u-popup :show="flowRecordingIF" mode="top">
			<!-- 			<view class="box_pp">
				{{historyDetails.name}}
			</view> -->
			<view class="viewHistory_flow_rate_history">
				<!-- 测线 -->
				<view class="measuringLine">
					<view class="" style="text-align: center;color: #aaff00;font-size: 50rpx;">
						实测流量列表
					</view>
					<view class="box_num">
						<view :class="{ 'num_i': i.dianfa == 1,'num_i_acv': i.dianfa == 3}"
							v-for="(i,index) in flowRecordingArr" :key="index" @click="clicDetailsIF(i)"
							@longpress="removeRecording(i.id)">
							<view class="text_top">
								<view class="dianfa">
									<text>{{i.name}}</text>
									<text style="font-size: 30rpx;">{{i.dianfa}}点法</text>
								</view>
								<view class="text">
									<view class="text_a">
										水深：
									</view>
									<view class="text_b">
										{{i.wD}}
									</view>
								</view>
								<view class="text">
									<view class="text_a">
										流量：
									</view>
									<view class="text_b">
										{{i.liusliangnub}}
									</view>
								</view>
							</view>
							<view class="text_bom">
								{{i.time}}
							</view>
						</view>
					</view>
				</view>
				<view class="butflx">
					<u-button class="custom-style" @click="hiddenRecordingFn" text="返回" :plain="true" shape="circle"
						color='#00ffff'></u-button>
				</view>
			</view>

		</u-popup>
		<!-- 历史流量详情  -->
		<u-popup :show="trafficDetailsIF" mode="top">

			<!-- 测线 -->
			<view class="measuring_box_details" v-if="historyDetails.dianfa == 3">
				<view class="" style="text-align: center;color: #00ff00;font-size: 40rpx;">
					实测流量列表
				</view>
				<view class="box_pp">
					{{historyDetails.name}}
				</view>
				<view class="box_num">
					<view class="num_i_nue" v-for="(i,index) in historyDetails.measuringArr" :key="index">
						<view class="text_bom">
							<view class="text_aaom">
								测线{{index + 1}}
							</view>
							<view class="text_bbom">
								平均流速：{{i.aveTy}}
							</view>
						</view>
						<view class="text_top">
							<view class="text">
								<view class="text_fdlx">
									<view class="text_a">
										{{index+1}}A
									</view>
									<view class="text_b">
										{{i.a.time}}
									</view>
									<view class="text_b">
										{{i.a.nub}}
									</view>
									<view class="text_b">
										{{i.a.evenness}}
									</view>
									<view class="text_b">
										{{i.a.liusu}}
									</view>

								</view>
								<view class="text_fdlx">
									<view class="text_a">
										{{index+1}}B
									</view>
									<view class="text_b">
										{{i.b.time}}
									</view>
									<view class="text_b">
										{{i.b.nub}}
									</view>
									<view class="text_b">
										{{i.b.evenness}}
									</view>
									<view class="text_b">
										{{i.b.liusu}}
									</view>
								</view>
								<view class="text_fdlx">
									<view class="text_a">
										{{index+1}}C
									</view>
									<view class="text_b">
										{{i.c.time}}
									</view>
									<view class="text_b">
										{{i.c.nub}}
									</view>
									<view class="text_b">
										{{i.c.evenness}}
									</view>
									<view class="text_b">
										{{i.c.liusu}}
									</view>
								</view>
							</view>
						</view>

					</view>
				</view>
				<view class="" style="display: flex;align-items: center;justify-content: space-between;">
					<view class="box_ff" style="margin-right: 10rpx;">
						水深：{{historyDetails.wD}}
					</view>
					<view class="box_ff">
						流量：{{historyDetails.liusliangnub}}
					</view>
				</view>

				<view class="box_ff">
					时间：{{historyDetails.time}}
				</view>
				<view class="flx_butflx">
					<!-- <view class="butflx_fggh"> -->
						<u-button class="custom-style" @click="trafficDetailsFn" text="返回" :plain="true" shape="circle"
							color='#00ffff'></u-button>
					<!-- </view> -->
<!-- 					<view class="butflx_fggh">
						<u-button class="custom-style" @click="trafficuploadFn" text="上报数据" :plain="true" shape="circle"
							color='#aaaaff'></u-button>
					</view> -->
				</view>

			</view>
			<view class="measuring_box_details_acv" v-if="historyDetails.dianfa == 1">
				<view class="" style="text-align: center;color: #00ff00;font-size: 50rpx;">
					测流记录表
				</view>
				<view class="box_ff" style="font-size: 40rpx;">
					测站：{{historyDetails.name}}
				</view>
				<view class="box_num">
					<view class="num_i_nue" v-for="(i,index) in historyDetails.measuringArr" :key="index">
						<view class="text_bom">
							<view class="text_aaom"
								style="text-align: center;background-color: #00ff00;border-radius: 10rpx;padding: 0 5rpx;color: #000000;font-size: 30rpx;">
								测线{{index + 1}}
							</view>
							<view class="">
								均匀度:{{i.evenness}}
							</view>
						</view>
						<view class=""
							style="display: flex;align-items: center;justify-content: space-between;font-size: 30rpx;color: #00ff00;">
							<view class="">
								时长:{{i.time}}
							</view>
							<view class="">
								信号:{{i.nub}}
							</view>
						</view>
						<view class="text_top">
							<view class="text">
								<view class="text_fdlx">
									<view class="text_a">
										{{index+1}}B
									</view>
									<view class="text_b">
										{{i.b}}
									</view>
								</view>
							</view>
						</view>

					</view>
				</view>
				<view class="box_ff" style="display: flex;align-items: center;justify-content: space-between;">
					<view class="" style="margin-right: 10rpx;">
						水深：{{historyDetails.wD}}
					</view>
					<view class="">
						流量：{{historyDetails.liusliangnub}}
					</view>
				</view>

				<view class="box_ff">
					时间：{{historyDetails.time}}
				</view>
				<view class="flx_butflx">
					<!-- <view class="butflx_fggh"> -->
						<u-button class="custom-style" @click="trafficDetailsFn" text="返回" :plain="true" shape="circle"
							color='#00ffff'></u-button>
					<!-- </view> -->
<!-- 					<view class="butflx_fggh">
						<u-button class="custom-style" @click="trafficuploadFn" text="上报数据" :plain="true" shape="circle"
							color='#aaaaff'></u-button>
					</view> -->
				</view>
			</view>
		</u-popup>

		<!-- 是否返回 -->
		<u-modal :show="showIF" :title="titleIF" @confirm="confirmIF" @cancel="cancelIF" showCancelButton></u-modal>
		<!-- 初始化电机 -->
		<u-modal :show="infIF" title="初始化设备" @confirm="cinfconfirmIF" @cancel="infcancelIF" showCancelButton></u-modal>
		<!-- 删除记录 -->
		<u-modal :show="removeIF" title="删除记录" @confirm="cinfconremoveIF" @cancel="infcanremoveIF"
			showCancelButton></u-modal>
		<!-- 本地网络历史 -->
		<!-- 遮罩层 -->
		<u-overlay :show="showSlot" @click="showSlot = !showSlot" opacity='0.9'>
			<view class="overlay-wrap">
				<view class="overlay-wrap__box" v-for="(i,index) in slotArr" :key="index">
					<view class="box_a" @click="layFn(i)">
						{{i}}
					</view>
				</view>
			</view>
		</u-overlay>
		<!-- 上传弹窗 -->
		<!-- 		<u-modal :show="showupload" title="是否上传数据？" showCancelButton @confirm="confirmuploadFn"
			@cancel="canceluploadFn"></u-modal> -->
		<u-picker :show="showupload" :columns="columns" keyName="label" @confirm="confirmuploadFn"
			@cancel="canceluploadFn" itemHeight="50"></u-picker>
		<!-- 提示未获取水深 -->
		<u-notify ref="uNotify" message="Hi uView"></u-notify>
	</view>
</template>

<script>
	import dayjs from '@/common/dayjs.min.js'
	const SixUniTts = uni.requireNativePlugin("SmallSix-SixUniTts")
	export default {
		data() {
			return {
				radiovalue1: '',
				radiolist1: [{
					name: '铅鱼底'
				}, {
					name: '流速仪'
				}, ],
				fontSize: '20px',
				columns: [], //选择器
				showupload: false, //上传弹窗
				showSlot: false, //遮罩
				slotArr: ['本地历史记录', '网络历史记录'], //遮罩
				trafficDetailsIF: false, //历史流量详情
				actiColor: '#00ff00', //进度条
				inacteColor: '#3e3e3e', //进度条
				percentageNub: 100, //进度条
				removeRecorID: '', //删除ID
				removeIF: false, // 删除历史记录
				flowRecordingIF: false, // 历史记录
				flowRecordingArr: [], // 历史记录
				flowRateIF: false, //计算流量
				saveIF: false, // 保存点流速
				activeColor: '#28a745',
				activeColorA: '#28a745',
				activeColorB: '#17a2b8',
				activeColorC: '#ffc107',
				activeColorD: '#dc3545',
				inactiveColor: '#e9ecef',
				percentage: 80,
				autoplay: false, //计时器
				duration: 120000, //滚动所需时间
				startVal: 0, //计时器开始值
				endVal: 120, //计时器结束值
				isActive: false, //信号灯闪烁
				inlineArr: [], //均匀度线条
				icColor: '#232323',
				infIF: false,
				flowCheckpop: false, //测量弹窗
				Arrflow: [], //历史记录
				urlAlphabet: 'useandom-26T198340PX75pxJACKVERYMINDBUSHWOLF_GQZbfghjklqvwyzrict',
				liusliangnub: 0, //平均总流量
				pointerWater: 'auto',
				pointerMeasure: 'auto',
				showIF: false,
				titleIF: '是否返回',
				cfgCeZhan: {
					rangeDifference: '0.3', //距离差
					installH: '', //安装高度
					thoroughH: {
						a: '',
						b: '',
						c: '',
					}, //入水深度
					waterH: '', //距离水面高度
					depthOfWater: '' //实际水深
				},
				valuesel: 0,
				setUp: {},
				showpop: false,
				deviceId: '', //蓝牙
				serviceId: '', //蓝牙
				characteristicId: '', //蓝牙
				fff: '', //蓝牙
				mfvNumArr: [], //获取流速
				sumArr: [], //求平均流速
				sumIfArr: true, //判断平均和数组
				timerFn: 0, //计时次数
				wD: 0, //水深
				count: 0, //计数
				xxNubAc: 0, //横向圈数
				yyNubAc: 0, //纵向圈数
				xxAcDistance: 0, //点击横向距离
				yyAcDistance: 0, //点击纵向距离
				timeFn: null, //定时器
				lanname: '', //蓝牙名称json
				signalNmb: 0, //信号数
				signalIF: true, //信号数
				finishIf: false, //信号结束
				firstSignalFn: false, //第一个信号
				dateA: null, //时间差
				dateB: null, //时间差
				signalInSecondsIf: false, //100秒后开始接收
				durationTime: 0, //时长
				differenceInMilliseconds: 0, //时间差
				setIntervalnubTime: null, //模拟信号差值
				timeNub: {
					sec: 0,
					secStr: '00',
					ms: 0,
					msStr: '0'
				}, //秒表
				evennub: 0, //均匀度
				liusuyiData: {}, //流速仪
				liusu: 0, //点流速
				pointVelocity: [], //测线点流速
				startMeasure: false, //开始测量
				measuringArr: [], //测线数组
				historyDetails: {}, //历史记录详情
				cexianCounter: 0, //测线计数器
				dianfa: 0, //测量几点法
				measuringXX: {
					name: '0',
					nub: '0'
				}, //横向测点
				measuringYY: {
					name: '0',
					nub: '0'
				}, //纵向测点
				devList: {}, //设备列表
				afterCalculationIF: false, //计算后上传
				jiakong: [],
				cezhanQk:'', //流速仪距离铅鱼底
			}
		},
		onShow() {
			// 电量
			this.electricQuantityFn()
			// 流速仪
			this.liusuyiData = this.vuex_liusuyiData
			this.lanname = this.vuex_devicename
			this.deviceId = this.vuex_deviceId
			this.getBLEDeviceServices()
			// 测站
			this.cezhanFn()
			// 测点点流速
			this.pointVelocity = this.vuex_pointVelocity
			uni.showLoading({
				mask: true,
				title: '连接设备中...'
			});
			setTimeout(() => {
				uni.hideLoading()
			}, 3000)
			// 断开设备
			uni.onBLEConnectionStateChange((res) => {
				// 该方法回调中可以用于处理连接意外断开等异常情况
				if (res.connected !== true) {
					console.log('意外断开');
					this.lanname = ''
					uni.$u.vuex('vuex_devicename', '')
					uni.$u.vuex('vuex_deviceId', '')
				}
			})
			// 计算测线
			this.positionMeasuringPoint()
			//设备列表
			this.deviceListFn()
		},
		onLoad(option) {
			this.dataFormat()
			this.handleAFewPointsOfMethod()
			uni.$u.vuex('vuex_pointVelocity', [])
			// 保持屏幕常亮
			uni.setKeepScreenOn({
				keepScreenOn: true
			});

		},
		onUnload() {
			console.log('卸载');
			//清除获取圈数
			clearInterval(this.timeFn)
			//清除多次性定时器 120秒
			clearInterval(this.setIntervalFn)
			//清模拟信号
			clearInterval(this.setIntervalnubTime)
			// 销毁语音
			SixUniTts.destroy()
		},
		mounted() {
			// 初始化
			SixUniTts.initSixUniTts(res => {})
		},
		methods: {
			// 处理数据格式
			dataFormat() {
				let obj = this.vuex_cezhanInfo
				let arr = obj.measurementModeList
				for (let i = 0; i < arr.length; i++) {
					if (arr[i].fieldsCode == 'qk') {
						obj.qk = arr[i].value
					}
					if (arr[i].fieldsCode == 'cexianlist') {
						obj.cexianlist = arr[i].value
					}
					if (arr[i].fieldsCode == 'signalLimit') {
						obj.signalLimit = arr[i].value
					}
				}
				this.vuexCezhanInfo = obj
			},
			// 处理几点法数据初始化
			handleAFewPointsOfMethod() {
				// 几点法
				this.dianfa = this.vuexCezhanInfo.morencefa
				if (uni.$u.test.isEmpty(this.vuex_lineRecord[0].a) && this.dianfa == 1) {
					this.initializeTheSurveyLineFn()
					return
				}
				if (!(uni.$u.test.isEmpty(this.vuex_lineRecord[0].a)) && this.dianfa == 3) {
					this.initializeTheSurveyLineFn()
					return
				}
				uni.$u.vuex('vuex_lineRecord', [])
				this.initializeTheSurveyLineFn()
			},
			// 为获取水深
			acquireFnBut() {
				this.$refs.uNotify.show({
					top: 30,
					type: 'error',
					color: '#ffffff',
					bgColor: '#cb2b41',
					message: '未连接水位计，请手动输入水深',
					duration: 3000,
					fontSize: 20,
					safeAreaInsetTop: false
				})
			},
			// 初始化测线
			initializeTheSurveyLineFn() {
				this.jiakong = this.vuexCezhanInfo.cexianlist
				this.cezhanQk = this.vuexCezhanInfo.qk
				// 测线条数
				let ceTiao = this.vuexCezhanInfo.cexianlist.length
				let arrList = []
				if (this.vuex_lineRecord.length == 0) {
					if (this.dianfa == 3) {
						for (let i = 0; i < ceTiao; i++) {
							let obj = {
								aveTy: 0,
								a: {
									time: '0',
									nub: '0',
									evenness: '0',
									liusu: '0'
								},
								b: {
									time: '0',
									nub: '0',
									evenness: '0',
									liusu: '0'
								},
								c: {
									time: '0',
									nub: '0',
									evenness: '0',
									liusu: '0'
								},
								status: 0,
							}
							arrList.push(obj)
						}
					} else if (this.dianfa == 1) {
						for (let i = 0; i < ceTiao; i++) {
							let obj = {
								aveTy: 0,
								b: '0',
								status: 0,
								time: '0',
								nub: '0',
								evenness: '0'
							}
							arrList.push(obj)
						}
					}
					this.measuringArr = arrList
					uni.$u.vuex('vuex_lineRecord', arrList)
					// 循环测线
					this.cexianCounter = 0
				} else {
					this.measuringArr = this.vuex_lineRecord
					// 循环测线
					let linaArr = this.vuex_lineRecord
					if (this.dianfa == 1) {
						for (let i = 0; i < linaArr.length; i++) {
							if (linaArr[i].aveTy != 0) {
								this.cexianCounter++
							}
						}
					}
					if (this.dianfa == 3) {
						for (let i = 0; i < linaArr.length; i++) {
							if (linaArr[i].a.liusu != 0) {
								this.cexianCounter++
							}
							if (linaArr[i].b.liusu != 0) {
								this.cexianCounter++
							}
							if (linaArr[i].c.liusu != 0) {
								this.cexianCounter++
							}
						}
					}

				}
			},
			// 清空测线数据
			clearLineFn() {
				uni.$u.vuex('vuex_lineRecord', [])
				this.initializeTheSurveyLineFn()
				// 计算测线
				this.positionMeasuringPoint()
			},
			// 电量
			electricQuantityFn() {
				if (this.percentage > 70) {
					this.activeColor = this.activeColorA
				}
				if (this.percentage > 40 && this.percentage <= 70) {
					this.activeColor = this.activeColorB
				}
				if (this.percentage > 20 && this.percentage <= 40) {
					this.activeColor = this.activeColorC
				}
				if (this.percentage <= 20) {
					this.activeColor = this.activeColorD
				}
			},
			// // 语音播报
			sixFn() {
				let broadcast = '用时,' + this.timeNub.secStr + '.' + this.timeNub.msStr + ',' + "信号数," + this.signalNmb +
					',' + '均匀度,' + this.evennub + ',' + '点流速,' + this.liusu
				// 设置音调
				SixUniTts.setSpeechRate({
					pitch: '0.8f'
				})
				// 设置语速
				SixUniTts.setSpeechRate({
					rate: '1.0f'
				})
				SixUniTts.startSpeech({
					speechText: broadcast
				})
			},
			sixErrFn() {
				let broadcast = '数据异常，请重新测量！'
				// 设置音调
				SixUniTts.setSpeechRate({
					pitch: '1.0f'
				})
				// 设置语速
				SixUniTts.setSpeechRate({
					rate: '1.0f'
				})
				SixUniTts.startSpeech({
					speechText: broadcast
				})
			},
			// 进度条
			progressBarFn() {
				this.percentageNub--
				if (this.percentageNub <= 40 && this.percentageNub > 20) {
					this.actiColor = '#ffff00'
				}
				if (this.percentageNub <= 20) {
					this.actiColor = '#ff0800'
				}
			},
			// 信号灯
			continuityFn() {
				if (this.isActive == false) {
					this.music.play_didi()
					this.isActive = true
					setTimeout(() => {
						this.isActive = false
					}, 200)
				}
			},
			// 计算时间差
			calculationTimeDifference(str) {
				let nub = JSON.parse(str)
				// 将时间字符串转换为日期对象
				// let dateB = new Date();
				// 计算时间差（毫秒）
				// this.differenceInMilliseconds = dateB.getTime() - this.dateA.getTime();
				// this.dateA = dateB
				// this.inlineArr.push(this.differenceInMilliseconds)
				this.inlineArr.push(nub.S.t)
			},
			// 生成1到10之间的随机整数
			getRandomInt(min, max) {
				return Math.floor(Math.random() * (max - min + 1)) + min;
			},
			// 模拟添加数据
			analogSignalAdd() {
				this.lineToArrayFn()
				this.cexianCounter++
			},
			// 模拟信号 数
			analogSignalNumber() {
				//清模拟信号
				clearInterval(this.setIntervalnubTime)
				this.setIntervalnubTime = setInterval(() => {
					let str = '{"S":{"t":1500}}'
					this.numberOfAcceptedSignals(str)
				}, 1500)
			},
			// 100秒定时器
			secondTimer() {
				//清除一次性定时器
				// 100秒停接收信号
				this.finishIf = false
				// 100后开始接收
				this.signalInSecondsIf = true
			},
			// 接受信号数
			numberOfAcceptedSignals(str) {
				this.continuityFn()
				// 100秒后信号
				if (this.signalInSecondsIf) {
					clearInterval(this.setIntervalFn)
					console.log('**100秒后信号*************');
					this.calculationTimeDifference(str)
					this.signalInSecondsIf = false
					this.signalNmb++
					this.pausedFn()
					// 开始测量
					this.startMeasure = false
					setTimeout(() => {
						// 均匀度
						this.evennessFn()
					}, 200)
				}
				// 第一个信号
				if (this.firstSignalFn == false) {
					console.log('开始计时第一个信号+++++++++++++');
					// 计时器时间开始
					this.startFn()
					this.firstSignalFn = true
					// 开始时间字符 串
					this.dateA = new Date();
					return
				}
				// 100秒之内信号
				if (this.finishIf) {
					console.log('实时信号100秒内------------');
					if (this.signalIF) {
						this.calculationTimeDifference(str)
						this.signalIF = false
						this.signalNmb++
						setTimeout(() => {
							this.signalIF = true
						}, 100)
					}
				}
			},
			// 计时器时间开 始
			startFn() {
				clearInterval(this.setIntervalFn)
				// 毫秒
				this.setIntervalFn = setInterval(this.startTimeMsFn, 99)
			},
			startTimeMsFn() {
				this.timeNub.ms++
				if (this.timeNub.ms == 10) {
					this.timeNub.sec++
					this.timeNub.ms = 0
					this.progressBarFn()
				}
				if (this.timeNub.ms < 10) {
					this.timeNub.msStr = "" + this.timeNub.ms;
				}
				if (this.timeNub.sec < 10) {
					this.timeNub.secStr = "0" + this.timeNub.sec;
				} else {
					this.timeNub.secStr = "" + this.timeNub.sec;
				}
				if (this.timeNub.sec == 120) {
					this.timeNub.msStr = '0'
					clearInterval(this.setIntervalFn)
				}
				if (this.timeNub.sec >= 100) {
					// 100秒定时器
					this.secondTimer()
				}
			},
			// 计时器暂停
			pausedFn() {
				//清除多次执行定时器
				clearInterval(this.setIntervalFn)
				//清模拟信号
				clearInterval(this.setIntervalnubTime)
			},
			// 均匀度
			evennessFn() {
				// 均匀度
				let x = this.sum(this.inlineArr) / this.inlineArr.length
				let y = ''
				let z = []
				for (var i = 0; i < this.inlineArr.length; i++) {
					y = (x - this.inlineArr[i]) * (x - this.inlineArr[i])
					z.push(y)
				}
				let n = this.sum(z) / this.inlineArr.length

				let m = Math.sqrt(n) / 10
				this.evennub = m.toFixed(0)
				setTimeout(() => {
					// 判断均匀度
					if (this.evennub < 50 && this.timeNub.sec < 120) {
						//计算流速
						this.calculatedVelocity()
					} else {
						this.sixErrFn()
					}
				}, 300)
			},
			// 计算点流速
			calculatedVelocity() {
				let a = this.liusuyiData.aa * 1
				let b = this.liusuyiData.bb * 1
				let c = this.liusuyiData.cc * 1
				let dianliusu = 0
				dianliusu = a + b * (this.signalNmb * c / (this.timeNub.secStr * 1 + this.timeNub.msStr / 10))
				this.liusu = dianliusu.toFixed(3)
				setTimeout(() => {
					this.sixFn()
					this.pointVelotyFn()
				}, 100)
			},
			// 保存点流速
			holdPointVelocityFn() {
				this.cexianCounter++
				if (this.dianfa == 3) {
					if (this.cexianCounter == this.cezhanObj.cexianlist.length * 3) {
						this.saveIF = false
					} else {
						this.saveIF = false
						this.flowCheckpop = false
					}
				} else {
					if (this.cexianCounter == this.cezhanObj.cexianlist.length) {
						this.saveIF = false
					} else {
						this.saveIF = false
						this.flowCheckpop = false
					}
				}

				// 计算流量
				this.lineToArrayFn()
				// 计算测线
				this.positionMeasuringPoint()
			},
			// 保存测线到数组
			lineToArrayFn() {
				let arr = this.measuringArr
				uni.$u.vuex('vuex_lineRecord', arr)
				if (this.dianfa == 3) {
					for (let i = 0; i < arr.length; i++) {
						if (arr[i].status == 0) {
							arr[i].status = 1
							arr[i].a.liusu = this.liusu
							arr[i].a.time = this.timeNub.secStr + '.' + this.timeNub.msStr
							arr[i].a.nub = this.signalNmb
							arr[i].a.evenness = this.evennub
							return
						}
						if (arr[i].status == 1) {
							if (arr[i].b.liusu == 0) {
								arr[i].b.liusu = this.liusu
								arr[i].b.time = this.timeNub.secStr + '.' + this.timeNub.msStr
								arr[i].b.nub = this.signalNmb
								arr[i].b.evenness = this.evennub
							} else {
								arr[i].status = 2
								arr[i].c.liusu = this.liusu
								arr[i].c.time = this.timeNub.secStr + '.' + this.timeNub.msStr
								arr[i].c.nub = this.signalNmb
								arr[i].c.evenness = this.evennub
								arr[i].aveTy = ((arr[i].a.liusu * 1 + arr[i].b.liusu * 1 + arr[i].c.liusu * 1) / 3)
									.toFixed(3)
							}
							return
						}
					}
				} else {
					for (let i = 0; i < arr.length; i++) {
						if (arr[i].status == 0) {
							arr[i].b = this.liusu
							arr[i].status = 1
							arr[i].aveTy = this.liusu
							arr[i].time = this.timeNub.secStr + '.' + this.timeNub.msStr
							arr[i].nub = this.signalNmb
							arr[i].evenness = this.evennub
							return
						}
					}
				}

				this.measuringArr = arr
				console.log('测线', arr);
			},
			// 测线位置和测点
			positionMeasuringPoint() {
				let arr = this.measuringArr
				if (this.dianfa == 1) {
					for (let i = 0; i < arr.length; i++) {
						if (arr[i].b == '0') {
							this.calculatedDistanceFn(this.cezhanObj.cexianlist[i].bC, i, this.cezhanObj.cexianlist[i].zJ)
							return
						}
					}
				}
				if (this.dianfa == 3) {
					let arr = this.measuringArr
					console.log('arr', arr);
					for (let i = 0; i < arr.length; i++) {
						if (arr[i].aveTy == 0) {
							if (arr[i].a.liusu == 0 || arr[i].a.liusu == '') {
								this.calculatedThreeFn(this.cezhanObj.cexianlist[i].bC, i, this.cezhanObj.cexianlist[i].zJ,
									this.cfgCeZhan.thoroughH.a * 1, 'A')
								return
							}
							if (arr[i].b.liusu == 0 || arr[i].b.liusu == '') {
								this.calculatedThreeFn(this.cezhanObj.cexianlist[i].bC, i, this.cezhanObj.cexianlist[i].zJ,
									this.cfgCeZhan.thoroughH.b * 1, 'B')
								return
							}
							if (arr[i].c.liusu == 0 || arr[i].c.liusu == '') {
								this.calculatedThreeFn(this.cezhanObj.cexianlist[i].bC, i, this.cezhanObj.cexianlist[i].zJ,
									this.cfgCeZhan.thoroughH.c * 1, 'C')
								return
							}

						}
					}
				}
			},
			// 3点法计算距离
			calculatedThreeFn(data, index, mubm, thhh, sty) {
				let nub = data * 1 - this.cfgCeZhan.depthOfWater * 1 + thhh + this.cfgCeZhan.rangeDifference * 1
				this.measuringYY.name = sty
				this.measuringYY.nub = (nub * 1).toFixed(2)
				this.measuringXX.name = index * 1 + 1
				this.measuringXX.nub = (mubm * 1).toFixed(2)
			},
			// 1点法计算距离
			calculatedDistanceFn(data, index, mubm) {
				let nub = data * 1 - this.cfgCeZhan.depthOfWater * 1 + this.cfgCeZhan.thoroughH.b * 1 + this.cfgCeZhan
					.rangeDifference * 1
				this.measuringYY.name = 'B'
				this.measuringYY.nub = (nub * 1).toFixed(2)
				this.measuringXX.name = index * 1 + 1
				this.measuringXX.nub = (mubm * 1).toFixed(2)
			},
			// 显示保存
			pointVelotyFn() {
				this.saveIF = true
				// 自动保存
				// this.holdPointVelocityFn()
				// setTimeout(()=>{
				// 	this.startMeasuringFn()
				// },100)
				// 自动保存

			},
			// 计算流量
			calculatedFlowFn() {
				this.flowCheckpop = false
				this.flowRateIF = true
				setTimeout(() => {
					this.calculateFlow()
				}, 500)
			},
			// 关闭计算流量弹窗
			hiddenTrafficFn() {
				this.flowRateIF = false
			},
			// 保存流量
			saveTrafficFn() {
				this.flowRateIF = false
				let day = dayjs(new Date()).format('YYYY-MM-DD HH:mm')
				let arr = this.vuex_flowHistory
				let obj = {
					id: this.nanoid(),
					name: this.cezhanObj.name,
					time: day,
					dianfa: this.dianfa,
					liusliangnub: this.liusliangnub,
					wD: this.wD,
					measuringArr: this.measuringArr
				}
				arr.unshift(obj)
				uni.$u.vuex('vuex_flowHistory', arr)
			},
			// 求和
			sum(arr) {
				var sum = 0;
				for (var i = 0; i < arr.length; i++) {
					sum += arr[i]
				}
				return sum
			},
			// 重新测量
			remeasureFn() {
				this.startMeasure = false
				this.startMeasuringFn()
			},
			// 测量开始计时
			startMeasuringFn() {
				clearInterval(this.setIntervalFn)
				// 开始测量
				// 进度条
				this.percentageNub = 100
				this.actiColor = '#00ff00'
				setTimeout(() => {
					this.startMeasure = true
				}, 3000)
				this.timeNub.sec = 0
				this.timeNub.secStr = '00'
				this.timeNub.ms = 0
				this.timeNub.msStr = '0'
				console.log('测量+++++++++++++++++++++++');
				// 保存测量
				this.saveIF = false
				//均匀度
				this.evennub = 0
				//点流速
				this.liusu = 0
				// 信号均匀度线条
				this.inlineArr = []
				// 计时
				this.durationTime = 0
				// 信号数
				this.signalNmb = 0
				// 时间差
				this.differenceInMilliseconds = 0
				// 弹窗
				this.flowCheckpop = true
				//信号数
				this.signalIF = true,
					// 100秒后接收信号
					this.signalInSecondsIf = false
				//第一个信号
				this.firstSignalFn = false
				//实时接收信号
				this.finishIf = true
			},
			// 计算后上传
			trafficuploadTrafficFn() {
				this.showupload = true
				// 计算后上传
				this.afterCalculationIF = true
			},
			// 上传数据
			trafficuploadFn() {
				this.showupload = true
				this.afterCalculationIF = false
			},
			confirmuploadFn(e) {
				this.showupload = false
				
				this.devList.name = this.cezhanObj.name
				this.devList.time = dayjs(new Date()).format('YYYY-MM-DD HH:mm')
				this.devList.dianfa = this.dianfa
				this.devList.liusliangnub = this.liusliangnub
				this.devList.wD = this.wD
				
				
				this.uploadHistoryFn(e.value[0].id)
				// 保存本地
				this.saveTrafficFn()
				
				// if (this.afterCalculationIF) {
				// 	this.saveTrafficFn()
				// }
			},
			canceluploadFn() {
				this.showupload = false
			},
			// 上传历史记录
			uploadHistoryFn(data) {
				uni.$u.http.post('/device/device_reported_data/addDeviceReportData', {
					"did": data,
					"data": JSON.stringify(this.devList)
				}).then(res => {
					console.log(res);
					if (res.code == 200) {
						uni.showToast({
							title: '上传成功',
							duration: 1500
						});

					}
				}).catch(err => {
					console.log('错误', err);
				})
			},
			// 设备列表
			deviceListFn() {
				uni.$u.http.get('/device/device/geiCeLiuCheList').then(res => {
					if (res.code == 200) {
						this.columns = []
						let arr = []
						arr = res.rows.map((i) => {
							return {
								label: i.nickName,
								id: i.id,
							}
						})
						this.columns.push(arr)
					}
				}).catch(err => {
					console.log('错误', err);
				})
			},
			// 横向
			xxFn() {
				let activate = ['0x01', '0x06', '0x00', '0x6E', '0x00', '0x01', '0x29', '0xD7']
				setTimeout(() => {
					this.conbuffer(activate)
				}, 100)
				console.log('横向');
			},
			// 横向反转
			xxRsFn() {
				let activate = ['0x01', '0x06', '0x00', '0x6E', '0x00', '0x02', '0x69', '0xD6']
				setTimeout(() => {
					this.conbuffer(activate)
				}, 100)
				console.log('横向');
			},
			// 纵向
			yyFn() {
				let activate = ['0x01', '0x06', '0x00', '0x6F', '0x00', '0x01', '0x78', '0x17']
				setTimeout(() => {
					this.conbuffer(activate)
				}, 100)
				console.log('纵向');
			},
			// 纵向反转
			yyRsFn() {
				let activate = ['0x01', '0x06', '0x00', '0x6F', '0x00', '0x02', '0x38', '0x16']
				setTimeout(() => {
					this.conbuffer(activate)
				}, 100)
				console.log('纵向');
			},
			// 刹车
			xxBrakeFn() {
				let brake = ['0x01', '0x06', '0x00', '0x6E', '0x00', '0x03', '0xA8', '0x16']
				setTimeout(() => {
					this.conbuffer(brake)
				}, 200)
				setTimeout(() => {
					this.conbuffer(brake)
				}, 500)
				console.log('横向刹车+++++++++++++++++++++++');
			},
			// 刹车
			yyBrakeFn() {
				let brake = ['0x01', '0x06', '0x00', '0x6F', '0x00', '0x03', '0xF9', '0xD6']

				setTimeout(() => {
					this.conbuffer(brake)
				}, 200)
				setTimeout(() => {
					this.conbuffer(brake)
				}, 500)
				console.log('纵向刹车-----------------------');
			},
			// 全部刹车
			aLLBrakeFn() {
				console.log('暂停');
				clearInterval(this.timeFn)
				setTimeout(() => {
					this.xxBrakeFn()
				}, 100)
				setTimeout(() => {
					this.yyBrakeFn()
				}, 300)
				setTimeout(() => {
					this.xxBrakeFn()
				}, 500)
				setTimeout(() => {
					this.yyBrakeFn()
				}, 700)
				setTimeout(() => {
					this.xxNumber()
				}, 900)
				setTimeout(() => {
					this.yyNumber()
				}, 1100)
			},
			// 横向圈数
			xxNumber() {
				let brake = ['0x02', '0x03', '0x00', '0x00', '0x00', '0x02', '0xC4', '0x38']
				setTimeout(() => {
					this.conbuffer(brake)
				}, 100)
			},
			// 纵向圈数
			yyNumber() {
				let brake = ['0x03', '0x03', '0x00', '0x00', '0x00', '0x02', '0xC5', '0xE9']
				setTimeout(() => {
					this.conbuffer(brake)
				}, 100)
			},
			// 获取横向圈数
			xxNumberAcquireFn(data) {
				let nub = (this.hexToDecimal(data) / 4096).toFixed(2)
				this.xxNubAc = (nub * 0.2).toFixed(2)

			},
			// 获取纵向圈数
			yyNumberAcquireFn(data) {
				let nub = (this.hexToDecimal(data) / 4096).toFixed(2)
				this.yyNubAc = (nub * 0.2).toFixed(2)

			},

			// 横向按钮正转
			forwordFn() {
				clearInterval(this.timeFn)
				this.xxFn()
				let nub = 0
				this.timeFn = setInterval(() => {
					this.xxNumber()
				}, 300)
			},
			// 横向按钮反转
			reversalFn() {
				clearInterval(this.timeFn)
				this.xxRsFn()
				let nub = 0
				this.timeFn = setInterval(() => {
					this.xxNumber()
				}, 300)
			},
			//设备下降
			inwaterFn() {
				clearInterval(this.timeFn)
				this.yyFn()
				let nub = 0
				this.timeFn = setInterval(() => {
					this.yyNumber()
				}, 300)
			},
			// 设备上升
			riseDevFn() {
				clearInterval(this.timeFn)
				this.yyRsFn()
				let nub = 0
				this.timeFn = setInterval(() => {
					this.yyNumber()
				}, 300)
			},
			// 测站信息
			cezhanFn() {
				// 配置
				if (uni.$u.test.isEmpty(this.vuex_cfgCeZhan)) {
					let obj = {
						installH: '', //安装高度
						rangeDifference: '', //铅鱼距离差
						thoroughH: {
							a: '',
							b: '',
							c: '',
						}, //入水深度
						waterH: '', //距离水面高度
						depthOfWater: '' //实际水深
					}
					this.cfgCeZhan = obj
				} else {
					this.cfgCeZhan = this.vuex_cfgCeZhan
				}
				this.wD = this.cfgCeZhan.depthOfWater
				// 测站
				let objList = this.vuexCezhanInfo
				this.cezhanObj = objList
				console.log('this.cezhanObj',this.cezhanObj);
			},
			// 确认
			confirmFn() {
				uni.$u.vuex('vuex_cfgCeZhan', this.cfgCeZhan)
				this.wD = this.cfgCeZhan.depthOfWater
				// 计算测线
				this.positionMeasuringPoint()
				this.showpop = false
			},
			// 处理水深测点系数
			chanWdInput() {
				console.log('水深');
				this.cfgCeZhan.thoroughH.a = (this.cfgCeZhan.depthOfWater * 0.2).toFixed(2)
				this.cfgCeZhan.thoroughH.b = (this.cfgCeZhan.depthOfWater * 0.6).toFixed(2)
				this.cfgCeZhan.thoroughH.c = (this.cfgCeZhan.depthOfWater * 0.8).toFixed(2)

			},
			// 初始化
			iniIFFn() {
				if (this.wD <= 0 || this.wD == null) {
					uni.showToast({
						title: '未输入水深',
						duration: 1500
					});

					return
				}
				this.infIF = true
			},

			// 初始化电机确定
			cinfconfirmIF() {
				this.infIF = false
				this.iniFn()
				this.clearLineFn()
			},
			// 初始化电机取消
			infcancelIF() {
				this.infIF = false
			},
			//初始化电机
			iniFn() {
				this.xxNubAc = 0
				this.yyNubAc = 0
				// 初始化电机
				let xstop = ['0x01', '0x10', '0x00', '0x70', '0x00', '0x04', '0x08', '0x03', '0xDE', '0x03', '0xDE',
					'0x03', '0xDE', '0x03', '0xDE', '0xC1', '0xEB'
				]
				// 横向圈数归零
				let xxZero = ['0x02', '0x06', '0x00', '0x08', '0x00', '0x01', '0xC9', '0xFB']
				// 纵向圈数归零 02 06 00 08 00 01
				let yyZero = ['0x03', '0x06', '0x00', '0x08', '0x00', '0x01', '0xC8', '0x2A']
				this.conbuffer(xstop)
				setTimeout(() => {
					this.conbuffer(xxZero)
				}, 200)
				setTimeout(() => {
					this.conbuffer(yyZero)
				}, 400)
			},
			//开始测流
			inquiryFn() {
				this.mfvNumArr = [] //数组100
				this.sumIfArr = true //数组求和平均判断
				let arr = ['0x04', '0x04', '0x00', '0x00', '0x00', '0x04', '0xF1', '0x9C']
			},
			// 设备上升
			riseFn() {
				let domStr = this.cezhanObj.installH * 1 - this.wD - this.cezhanObj.waterH * 1
			},
			// 输入框计算
			changeInputFn() {
				this.calculateFlow()
			},
			// 计算流量
			calculateFlow() {
				if (this.wD <= 0) {
					uni.showToast({
						icon: 'error',
						title: '未获取水深',
						duration: 1500
					});
					return
				}
				console.log('测站', this.cezhanObj);
				let vls = this.measuringArr
				// let vls = [{
				// 	aveTy: "0.972"
				// }, {
				// 	aveTy: "1.089"
				// }, {
				// 	aveTy: "1.061"
				// }, {
				// 	aveTy: "1.053"
				// }, {
				// 	aveTy: "1.042"
				// }, {
				// 	aveTy: "1.049"
				// }, {
				// 	aveTy: "1.004"
				// }, {
				// 	aveTy: "0.928"
				// }, {
				// 	aveTy: "0.955"
				// }, ]
				// console.log('vls', vls);
				let vlAll = []
				let vl0 = null //区域流量
				let vl1 = null //区域流量
				let vlz = null //区域流量
				let vln = null //区域流量
				let vln1 = null //区域流量
				let vln2 = null //区域流量

				// 不参与循环
				// cot
				let sin27LL = Math.sin(this.cezhanObj.lSA * Math.PI / 180)
				let cos27LL = Math.cos(this.cezhanObj.lSA * Math.PI / 180)
				let areaLL = cos27LL / sin27LL //三角面积L

				let sin27RR = Math.sin(this.cezhanObj.rSA * Math.PI / 180)
				let cos27RR = Math.cos(this.cezhanObj.rSA * Math.PI / 180)
				let areaRR = cos27RR / sin27RR //三角面积R
				// VL0
				vl0 = 0.5 * this.wD * this.wD * areaLL * (vls[0].aveTy * 1) * (this.cezhanObj.kL * 1)
				vlAll.push(vl0.toFixed(6) * 1)
				console.log('vl0', vl0);


				//VL1
				vl1 = 0.5 * [(vls[0].aveTy * 1) + (vls[0].aveTy * 1) * (this.cezhanObj
					.cexianlist[0].vM * 1)] * (this.wD) * (this.cezhanObj.cexianlist[0].cR * 1)
				vlAll.push(vl1.toFixed(6) * 1)
				console.log('vl1', vl1);

				// 中间逻辑
				if (vls.length > 1) {
					for (let i = 0; i < vls.length - 1; i++) {
						vlz = 0.5 * [(vls[i].aveTy * 1) * (this.cezhanObj.cexianlist[i].vM * 1) + (vls[i + 1].aveTy * 1) *
							(this.cezhanObj.cexianlist[i + 1].vM * 1)
						] * (this.wD) * [(this.cezhanObj.cexianlist[i + 1].cR * 1) - (this.cezhanObj.cexianlist[i].cR *
							1)]
						vlAll.push(vlz.toFixed(6) * 1)
					}
				}

				//VLN+1
				vln1 = 0.5 * [(vls[vls.length - 1].aveTy * 1) + (vls[vls.length - 1]
					.aveTy * 1) * (this.cezhanObj.cexianlist[vls.length - 1].vM * 1)] * (this.wD) * [(this
					.cezhanObj.qudikuandu * 1) - (this.cezhanObj.cexianlist[vls.length - 1].cR * 1)]
				vlAll.push(vln1.toFixed(6) * 1)
				console.log('vln1', vln1);


				//VLN+2
				vln2 = 0.5 * this.wD * this.wD * areaRR * (vls[vls.length - 1].aveTy * 1) * (this.cezhanObj.kR * 1)
				vlAll.push(vln2.toFixed(6) * 1)
				console.log('vln2', vln2, areaRR);
				// 计算总平均流速
				let vlQitem = []
				let vlQArr = []
				let vlQALL = []

				let sum = 0;
				for (let i = 0; i < vlAll.length; i++) {
					sum += vlAll[i];
				}
				this.liusliangnub = sum.toFixed(3) * 1
				console.log('流量数组', vlAll);
				console.log('流量', sum.toFixed(3) * 1);
			},
			// 配置
			allocationFn() {
				this.showpop = true
			},
			//弹窗配置
			// 返回
			retFn() {
				this.showIF = true
			},
			// 是否返回
			confirmIF() {
				uni.navigateBack({
					delta: 1
				});
				this.showIF = false
			},
			cancelIF() {
				this.showIF = false
			},
			confirmflowCheckpopFn() {
				this.flowCheckpop = false
			},
			// 历史记录遮罩
			// 测量类型
			layFn(item) {
				if (item == '本地历史记录') {
					this.flowRecordingIF = true
					this.flowRecordingArr = this.vuex_flowHistory
				}
				if (item == '网络历史记录') {
					//在起始页面跳转到test.vue页面并传递参数 JSON.stringify(arr) 
					uni.navigateTo({
						url: '/pages/currentMeasuringCar/historicalRecord'
					});

				}
			},
			// 历史流量
			flowRecordingFn() {
				// 遮罩 
				this.showSlot = true
			},
			hiddenRecordingFn() {
				this.flowRecordingIF = false
			},
			// 历史记录详情
			trafficDetailsFn() {
				this.trafficDetailsIF = false
			},
			clicDetailsIF(i) {
				this.historyDetails = i
				// let obj = i
				// obj.measuringArr = obj.measuringArr.length
				this.devList.name = i.name
				this.devList.time = i.time
				this.devList.dianfa = i.dianfa
				this.devList.liusliangnub = i.liusliangnub
				this.devList.wD = i.wD
				this.trafficDetailsIF = true
				console.log('iiii', i);
			},
			// 删除历史记录
			removeRecording(id) {
				this.removeRecorID = id
				this.removeIF = true
			},
			// 删除确定
			cinfconremoveIF() {
				let arr = this.removeById(this.flowRecordingArr, this.removeRecorID)
				uni.$u.vuex('vuex_flowHistory', arr)
				this.removeIF = false
			},
			// 删除取消
			infcanremoveIF() {
				this.removeIF = false
			},
			// 输入蓝牙数据
			conbuffer(data) {
				let msg = data
				// 向蓝牙设备发送一个0x00的16进制数据
				const buffer = new ArrayBuffer(msg.length)
				const dataView = new DataView(buffer)
				// dataView.setUint8(0, 0)
				for (var i = 0; i < msg.length; i++) {
					// dataView.setUint8(i, msg.charAt(i).charCodeAt())
					dataView.setUint8(i, msg[i]);
				}
				this.sendMsgToKey(buffer)
			},
			//监听消息变化++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
			listenValueChange(data) {
				let resHex = data
				setTimeout(() => {
					uni.onBLECharacteristicValueChange(res => {
						let resHex = this.ab2hex(res.value)
						// console.log('监听数据', resHex, resHex.length, resHex.substr(0, 18));
						// 获取横向圈数
						if (resHex.substr(0, 4) == '0203' && resHex.length == 18) {
							let str = resHex.substr(6, 8)
							this.xxNumberAcquireFn(str)
						}
						// 获取纵向圈数
						if (resHex.substr(0, 4) == '0303' && resHex.length == 18) {
							let str = resHex.substr(6, 8)
							this.yyNumberAcquireFn(str)
						}
						// 获取信号数
						if (resHex == '0602aabb') {
							// if (true) {
							if (this.startMeasure) {
								this.numberOfAcceptedSignals()
							}
						}
						// 获取信号数
						if (resHex.substr(0, 18) == '7b2253223a7b227422') {
							let str = this.hexToString(resHex)
							if (this.startMeasure) {
								this.numberOfAcceptedSignals(str)
							}
						}
					})
				}, 300)
			},
			//获取蓝牙的所有服务
			getBLEDeviceServices() {
				setTimeout(() => {
					uni.getBLEDeviceServices({
						// 这里的 deviceId 需要已经通过 createBLEConnection 与对应设备建立链接
						deviceId: this.vuex_deviceId,
						success: (res) => {
							console.log('获取蓝牙所有服务', res);
							//E95D93AF-251D-470A-A062-FA1922DFA9A8
							//6E400001-B5A3-F393-E0A9-E50E24DCCA9E
							res.services.forEach((item) => {

								if (item.uuid.indexOf("0000FFF0") != -1) {
									this.serviceId = item.uuid;
									//获取特征
									this.getBLEDeviceCharacteristics()
								}
								if (item.uuid.indexOf("0000FFE0") != -1) {
									this.serviceId = item.uuid;
									//获取特征
									this.getBLEDeviceCharacteristics()
								}
								if (item.uuid.indexOf("00001000") != -1) {
									this.serviceId = item.uuid;
									//获取特征
									this.getBLEDeviceCharacteristics()
								}
							})
						}
					})
				}, 1000)
			},
			//获取蓝牙特征
			getBLEDeviceCharacteristics() {
				console.log('获取蓝牙特征值');
				setTimeout(() => {
					uni.getBLEDeviceCharacteristics({
						// 这里的 deviceId 需要已经通过 createBLEConnection 与对应设备建立链接
						deviceId: this.deviceId,
						// 这里的 serviceId 需要在 getBLEDeviceServices 接口中获取
						serviceId: this.serviceId,
						success: (res) => {
							this.characteristics = res.characteristics
							res.characteristics.forEach((item) => {
								if (item.uuid.indexOf("FFF2") != -1) {
									this.fff = item.uuid
								}
								if (item.uuid.indexOf("FFE1") != -1) {
									this.fff = item.uuid
								}
								if (item.uuid.indexOf("0000FFE1") != -1) {

									this.characteristicId = item.uuid
									//利用传参的形势传给下面的notify，这里的uuid如果都需要用到，就不用做判断了，建议使用setTimeout进行间隔性的调用此方法
									this.notifyBLECharacteristicValueChange(item.uuid)
								}
								if (item.uuid.indexOf("0000FFF1") != -1) {
									this.characteristicId = item.uuid
									this.notifyBLECharacteristicValueChange(item.uuid)
								}
								// EW-DTU02
								if (item.uuid.indexOf("00001001") != -1) {
									this.fff = item.uuid
								}
								if (item.uuid.indexOf("00001002") != -1) {
									this.characteristicId = item.uuid
									this.notifyBLECharacteristicValueChange(item.uuid)
								}
							})
						},
						fail: (res) => {
							console.log(res)
						}
					})
				}, 1000)
			},
			// 10进制转32位二进制补码
			NumberOf1(num) {
				// 获取负数的绝对值
				const absoluteValue = Math.abs(num);

				// 将绝对值转换为32位二进制字符串
				let binaryString = absoluteValue.toString(2);

				// 确保二进制字符串长度为32位
				while (binaryString.length < 32) {
					binaryString = '0' + binaryString;
				}

				// 对二进制字符串取反
				const invertedBinaryString = binaryString.split('').map(bit => bit === '0' ? '1' : '0').join('');

				// 将取反后的二进制字符串转换为数字并加1
				const twosComplement = parseInt(invertedBinaryString, 2) + 1;

				// 再次将补码转换为32位二进制字符串
				binaryString = twosComplement.toString(2);
				// 确保二进制字符串长度为32位
				while (binaryString.length < 32) {
					binaryString = '0' + binaryString;
				}

				return binaryString;
			},
			// 二进制补码转16进制
			binaryToHex(binaryStr) {
				// 确保二进制字符串是32位
				if (binaryStr.length !== 32) {
					throw new Error('Binary string must be 32 bits long');
				}

				// 将二进制字符串转换为数字
				var number = parseInt(binaryStr, 2);

				// 转换为16进制并返回结果
				return number.toString(16);
				// 示例使用
				// var binaryStr = '010101010101010101010101010101010'; // 32位二进制补码
				// var hexStr = binaryToHex(binaryStr);
			},
			//数组求平均
			averageSum(arr) {
				if (arr.length === 0) {
					return 0; // 当数组为空时，平均值为0
				}

				let sum = 0;
				for (let i = 0; i < arr.length; i++) {
					sum += arr[i];
				}

				return sum / arr.length;
			},
			// 长度不够补0
			strRepair(str, nub) {
				let nubm = nub * 1
				let strif = str + ''
				if (strif.length < nubm) {
					for (let i = 0; i < nubm - str.length; i++) {
						strif = '0' + strif
					}
				}
				return strif
			},
			//给每个数组添加0x
			ocstr(data) {
				let arr = []
				for (let i = 0; i < data.length; i++) {
					data[i] = '0x' + data[i]
				}
				return data
			},
			// 每2个字符串为一个元素数组
			chunkStringByTwo(str) {
				const result = [];
				for (let i = 0; i < str.length; i += 2) {
					result.push(str.slice(i, i + 2));
				}
				return result;
			},
			// 处理ASCLL 30 -00
			ascllFn(data) {
				let str = data + ''
				let arr = this.chunkStringByTwo(str)

				for (let i = 0; i < arr.length; i++) {
					if (arr[i] == '00') {
						arr[i] = '30'
					}
				}
				let arrnew = arr

				let strnre = ''
				for (let i = 0; i < arrnew.length; i++) {
					strnre += arrnew[i]
				}
				return strnre
			},
			// CRC16校验
			crc16(dataHexString) {
				const dataBytes = [];
				for (let i = 0; i < dataHexString.length; i += 2) {
					dataBytes.push(parseInt(dataHexString.substr(i, 2), 16));
				}

				let crc = 0xFFFF;
				const polynomial = 0xA001;

				for (const byte of dataBytes) {
					crc ^= byte;
					for (let i = 0; i < 8; i++) {
						if (crc & 0x0001) {
							crc = ((crc >> 1) ^ polynomial) & 0xFFFF;
						} else {
							crc >>= 1;
						}
					}
				}
				let crcstr = crc.toString(16).toUpperCase();
				if (crcstr.length % 2 == 0) {
					let result = crcstr.match(/.{1,2}/g)
					return result;
				} else {
					let str = '0' + crcstr
					let result = str.match(/.{1,2}/g)
					return result;
				}
			},
			// 16进制转10进制
			hexToDecimal(hex) {
				return parseInt(hex, 16);
			},
			// 10进制转16进制
			decimalToHex(data) {
				let decimal = data * 1
				let hex = decimal.toString(16).toUpperCase();
				3
				if (hex.length % 2 !== 0) {
					return '0' + hex
				} else {
					return hex
				}
				// return decimal.toString(16).toUpperCase();
			},
			// 16进制转字符串 ASCII码
			hexToString(hex) {
				let str = '';
				for (let i = 0; i < hex.length; i += 2) {
					let charCode = parseInt(hex.substr(i, 2), 16);
					str += String.fromCharCode(charCode);
				}
				return str;
			},

			//字符串转16进制
			stringToHex(data) {
				let str = data + ''
				return str.split('').map(function(char) {
					return char.charCodeAt(0).toString(16).padStart(2, '0');
				}).join('');
			},
			// 16进制转汉字
			hexToChinese(hex) {
				var str = '';
				for (var i = 0; i < hex.length / 4; i++) {
					var codePoint = parseInt(hex.substr(i * 4, 4), 16); // 获取每四位的十六进制值并转换成十进制
					str += String.fromCharCode(codePoint); // 根据Unicode编码生成对应的字符
				}
				return str;
			},
			// 汉字转16进制
			convertToHex(str) {
				let result = '';
				for (let i = 0; i < str.length; i++) {
					result += str.charCodeAt(i).toString(16);
				}
				return result;
			},
			// 随机数
			getRandomNumber(min, max) {
				return Math.floor(Math.random() * (max - min + 1)) + min;
			},
			// 删除最小的前面几个数字
			removeSmallestN(arr, n) {
				// 对数组进行升序排序
				const sorted = arr.sort((a, b) => a - b);
				// 删除最前面的n个数字
				sorted.splice(0, n);
				return sorted;
			},
			// 删除最大的后面几个数字
			removeMax(arr, n) {
				// 对数组进行升序排序
				const sorted = arr.sort((a, b) => a - b);
				// 删除最后面的n个数字
				sorted.splice(-n);
				return sorted;
			},
			// ArrayBuffer转16进度字符串示例
			ab2hex(buffer) {
				const hexArr = Array.prototype.map.call(
					new Uint8Array(buffer),
					function(bit) {
						return ('00' + bit.toString(16)).slice(-2)
					}
				)
				return hexArr.join('')
			},
			/* 向设备发送消息(分包发送，单包20字节，递归发送)
			 */
			sendMsgToKey(buffer) {
				var that = this //vue中的this
				const packageSize = 20 //分包大小
				if (buffer.byteLength <= 20) { //如果小于20直接发送，不再继续调用
					uni.writeBLECharacteristicValue({
						// 这里的 deviceId 需要在上面的 getBluetoothDevices 或 onBluetoothDeviceFound 接口中获取
						deviceId: that.deviceId,
						// 这里的 serviceId 需要在上面的 getBLEDeviceServices 接口中获取
						serviceId: that.serviceId,
						// 这里的 characteristicId 需要在上面的 getBLEDeviceCharacteristics 接口中获取
						characteristicId: that.fff, //第二步写入的特征值
						// 这里的value是ArrayBuffer类型
						value: buffer,
						writeType: 'write',
						success: (res) => {
							//此时设备已接收到你写入的数据
							console.log('写入11111');

						},
						fail: (err) => {
							console.log('传输失败', err)
							this.lanname = this.vuex_devicename
						},
						complete: function() {}
					})
				} else { //如果大于20发送完成后继续递归调用
					var newData = buffer.slice(20)
					var writeBuffer = buffer.slice(0, 20)
					uni.writeBLECharacteristicValue({
						// 这里的 deviceId 需要在上面的 getBluetoothDevices 或 onBluetoothDeviceFound 接口中获取
						deviceId: that.deviceId,
						// 这里的 serviceId 需要在上面的 getBLEDeviceServices 接口中获取
						serviceId: that.serviceId,
						// 这里的 characteristicId 需要在上面的 getBLEDeviceCharacteristics 接口中获取
						characteristicId: that.fff, //第二步写入的特征值
						// 这里的value是ArrayBuffer类型
						value: writeBuffer,
						writeType: 'write',
						success: function(res) {
							console.log('写入22222');
							//写入后继续递归调用发送剩下的数据
							setTimeout(() => {
								that.sendMsgToKey(newData)
							}, 100)
						},
						fail: (err) => {
							this.lanname = this.vuex_devicename
							console.log('传输失败', err)
						},
						complete: function() {}
					})
				}
			},
			// 启用 notify 功能
			notifyBLECharacteristicValueChange(characteristicId) {
				console.log('启用 notify 功能');
				uni.notifyBLECharacteristicValueChange({
					state: true, // 启用 notify 功能
					// 这里的 deviceId 需要已经通过 createBLEConnection 与对应设备建立链接
					deviceId: this.deviceId,

					// 这里的 serviceId 需要在 getBLEDeviceServices 接口中获取
					serviceId: this.serviceId,
					// 这里的 characteristicId 需要在 getBLEDeviceCharacteristics 接口中获取
					characteristicId: this.characteristicId,
					success: (res) => {
						console.log('蓝牙名字', res);
						// vuex
						// uni.$u.vuex('vuex_devicename', this.vuexlist.name)
						uni.hideLoading()
						this.listenValueChange()
						uni.showToast({
							title: '设备已连接',
							mask: true,
							duration: 1000
						});
						// 暂停
						// this.aLLBrakeFn()
						console.log('蓝牙服务已开启');
					},
					fail: (res) => {
						uni.hideLoading()
						uni.showToast({
							title: '连接设备失败',
							icon: 'fail',
							mask: true,
							duration: 1000
						});

					}
				})
			},
			// 删除数组
			removeById(arr, id) {
				for (let i = 0; i < arr.length; i++) {
					if (arr[i].id === id) {
						arr.splice(i, 1);
						break;
					}
				}
				return arr;
			},
			// 生Id
			nanoid(size = 21) {
				let id = ''
				let i = size
				while (i--) {
					id += this.urlAlphabet[(Math.random() * 64) | 0]
				}
				return id
			},
			// 蓝牙
			tobelFn() {
				//在起始页面跳转到test.vue页面并传递参数
				uni.navigateTo({
					url: '/pages/index/devBEL'
				});

			},
			//断开连接
			lampRFn() {
				uni.closeBLEConnection({
					deviceId: this.vuex_deviceId,
					success: (res) => {
						uni.showToast({
							title: '设备已断开',
							icon: 'success',
							mask: true,
							duration: 1000
						});
						this.lanname = ''
						uni.$u.vuex('vuex_devicename', '')
					}
				})
			},
		}
	}
</script>
<style scoped lang="scss">
	// 历史记录遮罩
	.overlay-wrap {
		@include flex;
		display: flex;
		flex-direction: column;
		justify-content: center;
		align-items: center;
		flex: 1;

		.box_a {
			padding: 30rpx;
			margin: 30rpx;
			border-radius: 30rpx;
			border: 5rpx solid rgba(170, 255, 255, 0.5);
			color: #00ffe2;
			font-size: 60rpx;
			background-color: rgba(0, 0, 0, 0.9);
		}
	}

	// 内容
	.concent_box {
		padding: 0 30rpx 30rpx 30rpx;

		.inibox {
			margin: 20rpx 0;
			display: flex;
			align-items: center;
			justify-content: space-between;

			.inibox_but {
				width: 330rpx;
				text-align: center;
				color: #ffffff;
				font-size: 30rpx;
				padding: 20rpx 0;
				border-radius: 200rpx;
				background-color: #594e6f;
			}

			.inibox_in {
				width: 330rpx;

				.inibox_tt_a {
					text-align: center;
					color: #ffffff;
					font-size: 30rpx;
					padding: 20rpx 0;
					border-radius: 200rpx;
					background-color: #bd0000;
				}

				.inibox_tt_b {
					text-align: center;
					color: #ffffff;
					font-size: 30rpx;
					padding: 20rpx 0;
					border-radius: 200rpx;
					background-color: #00b457;
				}

				.inibox_ttacv {
					color: #ffffff;
					background-color: #d0d4d4;
				}
			}


			.inibox_acv {
				color: #ffffff;
				background-color: #d0d4d4;
			}


		}

		// 故障灯
		.lamp {
			display: flex;
			align-items: center;
			justify-content: space-between;
			padding: 0 30rpx;

			.lamp_l {
				width: 50rpx;
				height: 50rpx;
				border-radius: 100rpx;
				background-color: #00ff11;
				// border: 10rpx solid #77ff9e;
				box-shadow: inset 0 0 10rpx rgba(0, 0, 0, 0.3);
			}

			.lamp_r {
				width: 50rpx;
				height: 50rpx;
				border-radius: 100rpx;
				// background-color: #ff0000;
				background-color: #ddc7c7;
				box-shadow: inset 0 0 10rpx rgba(0, 0, 0, 0.3);
			}
		}

		.element_box {
			width: 500rpx;
			height: 10rpx;
			border-radius: 20rpx;
			background-color: #000000;
			display: flex;
			align-items: center;
		}




		.lamp_a {
			display: flex;
			align-items: center;
			justify-content: space-between;
			padding: 0 30rpx;

			.lamp_l_a {
				width: 50rpx;
				height: 50rpx;
				border-radius: 100rpx;
				background-color: #c2e2cc;
				box-shadow: inset 0 0 20rpx rgba(0, 0, 0, 0.3);
			}

			.lamp_r_a {
				width: 50rpx;
				height: 50rpx;
				border-radius: 100rpx;
				background-color: #ff0000;
				box-shadow: inset 0 0 20rpx rgba(0, 0, 0, 0.3);
			}
		}

		// 遥控器
		.remoteControlUnit {
			width: 690rpx;
			height: 690rpx;
			border-radius: 350rpx;
			margin: 20rpx 0;
			background-color: #e4e5e7;
			border: 5rpx solid #fff;
			box-shadow: 0 0 10rpx 10rpx rgba(0, 0, 0, 0.1);

			.con_box {
				height: 100%;
				display: flex;
				flex-direction: column;
				align-items: center;
				justify-content: space-around;

				.top_b {
					width: 180rpx;
					height: 180rpx;
					border-radius: 150rpx;
					display: flex;
					justify-content: center;
					align-items: center;
					background-color: #f1f2f3;

				}

				.acv_b {
					background-color: #c9ffdb;
					box-shadow: 0 0 10rpx 10rpx rgba(76, 255, 0, 0.8);
				}

				.com_b {
					width: 100%;
					display: flex;
					align-items: center;
					justify-content: space-around;

					.coe_r {
						width: 180rpx;
						height: 180rpx;
						border-radius: 100rpx;
						display: flex;
						justify-content: center;
						align-items: center;
						background-color: #f1f2f3;
					}

					.acv_b {
						background-color: #c9ffdb;
						box-shadow: 0 0 10rpx 10rpx rgba(76, 255, 0, 0.8);
					}

					.cen_box {
						width: 250rpx;
						height: 250rpx;
						border-radius: 150rpx;
						display: flex;
						justify-content: center;
						align-items: center;
						color: #cb1f30;
						font-size: 80rpx;
						background-color: #efeff1;
						border: 5rpx solid #fff;
						box-shadow: 0 0 10rpx 10rpx rgba(0, 0, 0, 0.1);
					}

					.cen_avc {
						background-color: #ffc6c7;
						box-shadow: 0 0 10rpx 10rpx rgba(255, 42, 92, 0.8);
					}
				}

				.bom_b {
					width: 180rpx;
					height: 180rpx;
					border-radius: 150rpx;
					display: flex;
					justify-content: center;
					align-items: center;
					background-color: #f1f2f3;
				}

				.acv_b {
					background-color: #c9ffdb;
					box-shadow: 0 0 10rpx 10rpx rgba(76, 255, 0, 0.8);
				}
			}
		}


		.realtime {
			display: flex;
			align-items: center;
			justify-content: space-around;
			font-size: 40rpx;
			padding: 30rpx;
			margin: 20rpx 0;
			background-color: #fafafa;
			border-radius: 20rpx;
			border: 3rpx solid #fff;
			padding: 10rpx;
			box-shadow: 0 0 15rpx rgba(127, 127, 127, 0.2);

			.i_a {
				color: #304951;
			}

			.i_b {
				font-size: 70rpx;
				text-align: center;
				border-radius: 10rpx;
				width: 260rpx;
				font-family: 'MyFont';
				background-color: #090e10;
				color: #33ff9e;
			}

			.i_c {
				margin-left: 20rpx;
				font-size: 40rpx;
			}
		}
	}

	// 配置参数
	.classpop {
		width: 690rpx;
		height: 1200rpx;
		overflow: auto;
		padding: 100rpx 30rpx;
		display: flex;
		flex-direction: column;

		.classpop_tit {
			font-size: 50rpx;
			margin: 0 auto;
			line-height: 100rpx;
			color: #000000;
		}

		.conpop {
			.popitem {
				margin-bottom: 10rpx;
				display: flex;
				align-items: center;
				justify-content: left;

				.poptext {
					width: 240rpx;
					text-align: justify;
					text-align-last: justify;
				}

				.poptext_inpp {
					width: 350rpx;
					display: flex;
					justify-content: space-between;
					align-items: center;

					.buty {
						width: 100rpx;
						margin-left: 20rpx;
					}
				}

				.poptext_flx {
					width: 320rpx;
					display: flex;
					justify-content: space-between;
					align-items: center;
					// padding: 0rpx 20rpx;
					font-size: 50rpx;
					color: #000000;
					border-radius: 10rpx;

					// background-color: #e2f1fa;
					.tex_l {
						width: 230rpx;
						text-align: center;
						border-radius: 10rpx;
						background-color: #daeaf3;
					}

					.tex_r {
						font-size: 35rpx;
						color: #5b5b5b;
					}
				}

				.poptext_a {
					width: 320rpx;
					text-align: justify;
					text-align-last: justify;
				}
			}

			.jiag_tier {
				padding: 20rpx 0 10rpx 0;
				font-size: 45rpx;
				font-weight: bold;
				color: #5460a2;
				text-align: center;
				background-color: #ffffff;
			}

			.jiag_box {
				display: flex;
				align-items: center;
				justify-content: space-between;

				.jiag_it {
					width: 128rpx;
					padding: 0 5rpx;
					background-color: #5460a2;
					color: #ffffff;
					text-align: center;
					border-radius: 2rpx;
				}
			}

			.jiag_flx {
				display: flex;
				align-items: center;
				justify-content: space-between;

				.jiag_fnub {
					width: 128rpx;
					padding: 0 5rpx;
					// background-color: #5460a2;
					color: #5460a2;
					text-align: center;
					border: 1rpx solid #5460a2;
				}
			}

			.jiag_tit_fflx {
				display: flex;
				align-items: center;
				justify-content: space-between;

				.jiag_tit {
					font-size: 45rpx;
					font-weight: bold;
					color: #5460a2;
					text-align: center;
					background-color: #ffffff;
				}
			}


		}

		.butpop {
			margin-top: 30rpx;
			display: flex;
			align-items: center;
			justify-content: space-around;
		}
	}

	// 开始测量弹窗 历史记录
	.butflx {
		margin: 20rpx 0 150rpx 0;
		// display: flex;
		// align-items: center;
		// justify-content: center;
		// padding: 10rpx;
		// background-color: rgba(170, 255, 255, 0.3);
		// border: 5rpx solid #aaffff;
		// color: #aaffff;
		// text-align: center;
		// border-radius: 30rpx;
		// font-size: 50rpx;
		// margin-bottom: 50rpx;
	}


	// 上传数据
	.but_upload {
		margin-top: 20rpx;
	}

	.viewHistory {
		width: 700rpx;
		height: 1600rpx;
		overflow: auto;
		padding: 50rpx 30rpx 30rpx 30rpx;
		margin: 0 auto;
		background-color: #000000;


		.head_d {
			width: 700rpx;
			height: 150rpx;
			padding: 30rpx 0;
			display: flex;
			align-items: center;
			justify-content: space-around;
			// background-color: #00ff11;
			// font-family: 'MyFont';
			font-size: 35rpx;

			.yuan_a {
				width: 230rpx;
				padding: 10rpx;
				border-radius: 150rpx;
				display: flex;
				flex-direction: column;
				align-items: center;
				color: #ffd500;
				border: 10rpx solid rgba(255, 255, 255, 0.2);
				background-color: rgba(255, 255, 255, 0.1);

				.nub {
					color: #00ff11;
					font-size: 70rpx;

					.yang_texrt {
						font-family: 'qingyuan';
					}
				}

				.linbox {
					background-color: #ffd500;
					width: 160rpx;
					height: 1rpx;
				}
			}

			.yuan_b {
				width: 50rpx;
				height: 50rpx;
				margin-bottom: 10rpx;
				border-radius: 50rpx;
				background-color: #00ff00;
				border: 10rpx solid #dfffcd;
				box-shadow: 0 0 50rpx rgba(102, 255, 0, 1.0);
			}

			.yuan_c {
				width: 50rpx;
				height: 50rpx;
				margin-bottom: 10rpx;
				border-radius: 50rpx;
				background-color: #2c3b0d;
				border: 10rpx solid #505a49;
				// box-shadow: 0 0 50rpx rgba(255, 226, 0, 1);
			}
		}

		// 时间线条
		.line_cla_box {
			border-radius: 20rpx;
			padding: 20rpx;
			border: 5rpx solid rgba(255, 255, 255, 0.2);
			background-color: rgba(255, 255, 255, 0.1);

			.line_cla {
				display: flex;
				flex-wrap: wrap;
				justify-content: center;
				align-items: flex-end;

				.line_a {
					width: 5rpx;
					height: 10rpx;
					border-radius: 5rpx;
					margin: 0.5px;
					background-color: rgba(190, 240, 0, 1);

				}
			}

			.junyun {
				display: flex;
				justify-content: space-between;
				align-items: center;
				// margin-top: 20rpx;
				font-size: 45rpx;
				text-align: center;
				color: #000000;

				.junyun_a {
					width: 325rpx;
					border-radius: 50rpx 0 0 50rpx;
					background-color: rgba(190, 240, 0, 1);
				}

				.junyun_b {
					width: 325rpx;
					border-radius: 0 50rpx 50rpx 0;
					background-color: rgba(190, 240, 0, 1);
				}
			}
		}

		// 进度条
		.progress_bar {
			margin: 10rpx 0;
		}

		// 测线流量颜色
		.measuring_box {
			margin-bottom: 500rpx;

			.box_num {
				// display: flex;
				// align-items: center;
				// justify-content: space-between;
				// flex-wrap: wrap;
				padding: 10rpx;

				.num_i_box {
					// width: 320rpx;
					margin: 10rpx 0;
					background-color: rgba(71, 45, 1, 0.5);
					border-radius: 20rpx;
					border: 3rpx solid rgba(255, 195, 15, 1.0);
					padding: 10rpx;
					box-shadow: 0 0 20rpx rgba(255, 195, 15, 1.0);

					.text_top {

						.text {
							// margin-bottom: 10rpx;
							// display: flex;
							// justify-content: space-between;
							// align-items: center;

							// font-size: 30rpx;
							.text_fdlx {
								margin-top: 10rpx;
								padding: 0 10rpx;
								border-radius: 10rpx;
								display: flex;
								justify-content: space-between;
								align-items: center;
								// background-color: rgba(255, 195, 15, 1.0);

								color: rgba(255, 195, 15, 1.0);

								.text_a {
									width: 100rpx;
									text-align: center;
									color: rgba(255, 195, 15, 1.0);
								}

								.text_b {
									width: 130rpx;
									border-radius: 5rpx;
									color: rgba(255, 195, 15, 1.0);
									text-align: center;
								}

								.text_c {
									width: 130rpx;
									border-radius: 5rpx;
									color: rgba(0, 0, 0, 1.0);
									background-color: rgba(255, 195, 15, 1.0);
									text-align: center;
								}

							}

						}
					}

					.text_bom {
						// text-align: center;
						color: rgba(255, 195, 15, 1.0);
						font-size: 35rpx;
						// margin-bottom: 10rpx;
						display: flex;
						align-items: center;
						justify-content: space-between;

						.text_aaom {
							// color: rgba(0, 0, 0, 1.0);
						}

						.text_bbom {
							color: rgba(0, 0, 0, 1.0);
							border-radius: 5rpx;
							padding: 0rpx 10rpx;
							background-color: rgba(255, 195, 15, 1.0);
						}
					}
				}

				.num_i_nue {
					// width: 320rpx;
					margin: 10rpx 0;
					background-color: rgba(53, 71, 0, 0.2);
					border-radius: 20rpx;
					padding: 10rpx;
					border: 3rpx solid rgba(131, 255, 247, 1.0);
					box-shadow: 0 0 20rpx rgba(131, 255, 247, 1.0);

					.text_top {

						.text {
							// margin-bottom: 10rpx;
							// display: flex;
							// justify-content: space-between;
							// align-items: center;

							// font-size: 30rpx;
							.text_fdlx {
								margin-top: 10rpx;
								padding: 0 10rpx;
								border-radius: 10rpx;
								display: flex;
								justify-content: space-between;
								align-items: center;
								// background-color: rgba(131, 255, 247, 1.0);

								color: rgba(131, 255, 247, 1.0);

								.text_a {
									width: 100rpx;
									text-align: center;
									// color: rgba(0, 0, 0, 0.8);
								}

								.text_b {
									width: 130rpx;
									border-radius: 5rpx;
									// color: rgba(0, 0, 0, 1.0);
									// background-color: rgba(0, 0, 0, 1);
									text-align: center;
								}

								.text_c {
									width: 130rpx;
									border-radius: 5rpx;
									color: rgba(0, 0, 0, 1.0);
									background-color: rgba(131, 255, 247, 1.0);
									text-align: center;
								}
							}

						}
					}

					.text_bom {
						// text-align: center;
						color: rgba(255, 213, 0, 1.0);
						font-size: 30rpx;
						// margin-bottom: 10rpx;
						display: flex;
						align-items: center;
						justify-content: space-between;
						font-size: 35rpx;

						.text_aaom {
							// color: rgba(0, 0, 0, 1.0);
						}

						.text_bbom {
							color: rgba(0, 0, 0, 1.0);
							border-radius: 5rpx;
							padding: 0rpx 10rpx;
							background-color: rgba(150, 255, 144, 1.0);
						}
					}
				}

				.num_i_acv {
					// width: 320rpx;
					margin: 10rpx 0;
					background-color: rgba(53, 71, 0, 0.2);
					border-radius: 20rpx;
					padding: 10rpx;
					box-shadow: 0 0 20rpx rgba(156, 175, 185, 0.8);

					.text_top {

						.text {
							// margin-bottom: 10rpx;
							// display: flex;
							// justify-content: space-between;
							// align-items: center;

							// font-size: 30rpx;
							.text_fdlx {
								margin-top: 10rpx;
								padding: 0 10rpx;
								border-radius: 10rpx;
								display: flex;
								justify-content: space-between;
								align-items: center;
								// background-color: rgba(156, 175, 185, 0.8);

								color: rgba(156, 175, 185, 0.8);

								.text_a {
									width: 100rpx;
									text-align: center;
									color: rgba(156, 175, 185, 0.8);
								}

								.text_b {
									width: 130rpx;
									border-radius: 5rpx;
									color: rgba(156, 175, 185, 0.8);
									// background-color: rgba(0, 0, 0, 1);
									text-align: center;
								}

								.text_c {
									width: 130rpx;
									border-radius: 5rpx;
									color: rgba(0, 0, 0, 0.8);
									background-color: rgba(156, 175, 185, 0.8);
									text-align: center;
								}
							}

						}
					}

					.text_bom {
						// text-align: center;
						color: rgba(255, 213, 0, 0.5);
						font-size: 35rpx;
						// margin-bottom: 10rpx;
						display: flex;
						align-items: center;
						justify-content: space-between;

						.text_aaom {
							// color: rgba(0, 0, 0, 1.0);
						}

						.text_bbom {
							color: rgba(0, 0, 0, 1.0);
							border-radius: 5rpx;
							padding: 0rpx 10rpx;
							background-color: rgba(156, 175, 185, 0.8);
						}
					}
				}
			}
		}
	}

	// 计算流量
	.viewHistory_flow_rate {
		width: 700rpx;
		height: 1600rpx;
		overflow: auto;
		padding: 50rpx 30rpx 30rpx 30rpx;
		margin: 0 auto;
		background-color: #000000;

		// 测线
		.measuringLine {
			.box_num {
				display: flex;
				align-items: center;
				justify-content: space-between;
				flex-wrap: wrap;

				.num_i {
					width: 320rpx;
					margin: 10rpx 0;
					background-color: rgba(54, 71, 0, 0.5);
					border-radius: 20rpx;
					border: 3rpx solid rgba(170, 255, 0, 1);
					padding: 10rpx;
					box-shadow: 0 0 20rpx rgba(170, 255, 0, 1);

					.text_top {

						// font-family: 'MyFont';
						.text {
							margin-bottom: 5rpx;
							display: flex;
							justify-content: space-between;
							align-items: center;
							font-size: 30rpx;

							.text_a {
								color: rgba(170, 255, 0, 1);
							}

							.text_b {
								color: #000000;
								text-align: center;
								width: 160rpx;
								border-radius: 10rpx;
								background-color: rgba(170, 255, 0, 1);
							}
						}
					}

					.text_bom {
						text-align: center;
						color: rgba(255, 170, 0, 1.0);
						font-size: 35rpx;
					}
				}
			}

			// 流量
			.depth_water {
				display: flex;
				align-items: center;
				justify-content: space-between;
				font-size: 60rpx;
				margin: 20rpx 0;
				border-radius: 10rpx;
				color: rgba(0, 0, 0, 1.0);
				border: 5rpx solid rgba(0, 255, 0, 1.0);
				background-color: rgba(0, 255, 0, 1.0);

				.water_a {
					width: 200rpx;
					text-align: center;

				}

				.water_b {
					display: flex;
					align-items: center;
					justify-content: space-between;
					width: 450rpx;
					border-radius: 10rpx;
					background-color: #000000;
					padding: 5rpx 15rpx;

					.water_c {
						padding: 0 10px;
						color: rgba(0, 255, 0, 1.0);
					}
				}

			}

			.depth_water_a {
				display: flex;
				align-items: center;
				justify-content: space-between;
				font-size: 60rpx;
				margin: 20rpx 0;
				border-radius: 10rpx;
				color: rgba(0, 0, 0, 1.0);
				border: 5rpx solid rgba(0, 255, 0, 1.0);
				background-color: rgba(0, 255, 0, 1.0);

				.water_a {
					width: 200rpx;
					text-align: center;

				}

				.water_b {
					display: flex;
					align-items: center;
					justify-content: space-between;
					width: 450rpx;
					border-radius: 10rpx;
					background-color: #000000;
					padding: 5rpx 15rpx;

					.water_c {
						padding: 0 10px;
						color: rgba(0, 255, 0, 1.0);
					}
				}

			}
		}
	}

	// 历史流量
	.viewHistory_flow_rate_history {
		width: 700rpx;
		height: 1600rpx;
		overflow: auto;
		padding: 50rpx 30rpx 30rpx 30rpx;
		margin: 0 auto;
		background-color: #000000;

		// 测线
		.measuringLine {
			.box_num {
				display: flex;
				align-items: center;
				justify-content: space-between;
				flex-wrap: wrap;

				.num_i {
					width: 320rpx;
					margin: 10rpx 0;
					border-radius: 20rpx;
					border: 3rpx solid rgba(170, 255, 0, 1.0);
					padding: 10rpx;
					box-shadow: 0 0 20rpx rgba(170, 255, 0, 1.0);

					.text_top {
						.dianfa {
							font-size: 40rpx;
							text-align: center;
							border-radius: 10rpx;
							margin-bottom: 10rpx;
							color: rgba(170, 255, 0, 1.0);
							// background-color: rgba(170, 255, 0, 1.0);

						}

						.text {
							margin-bottom: 5rpx;
							display: flex;
							justify-content: space-between;
							align-items: center;
							font-size: 30rpx;

							.text_a {
								color: rgba(170, 255, 0, 1.0);
							}

							.text_b {
								color: #000000;
								text-align: center;
								width: 200rpx;
								border-radius: 10rpx;
								background-color: rgba(170, 255, 0, 1.0);
							}
						}
					}

					.text_bom {
						text-align: center;
						color: rgba(170, 255, 0, 1.0);
						font-size: 35rpx;
					}
				}

				.num_i_acv {
					width: 320rpx;
					margin: 10rpx 0;
					border-radius: 20rpx;
					border: 3rpx solid rgba(255, 255, 0, 1.0);
					padding: 10rpx;
					box-shadow: 0 0 20rpx rgba(255, 255, 0, 1.0);

					.text_top {

						.dianfa {
							font-size: 40rpx;
							text-align: center;
							border-radius: 10rpx;
							margin-bottom: 10rpx;
							color: rgba(255, 255, 0, 1.0);
							// background-color: rgba(255, 255, 0, 1.0);

						}

						.text {
							margin-bottom: 5rpx;
							display: flex;
							justify-content: space-between;
							align-items: center;
							font-size: 30rpx;

							.text_a {
								color: rgba(255, 255, 0, 1.0);
							}

							.text_b {
								color: #000000;
								text-align: center;
								width: 200rpx;
								border-radius: 10rpx;
								background-color: rgba(255, 255, 0, 1.0);
							}
						}
					}

					.text_bom {
						text-align: center;
						color: rgba(255, 255, 0, 1.0);
						font-size: 35rpx;
					}
				}
			}
		}
	}

	.butflx_fggh {
		width: 330rpx;
	}

	//历史纪律详情
	.measuring_box_details {
		width: 700rpx;
		height: 1600rpx;
		overflow: auto;
		padding: 50rpx 30rpx 30rpx 30rpx;
		margin: 0 auto;
		background-color: #000000;

		.flx_butflx {
			display: flex;
			align-items: center;
			justify-content: space-between;
			margin-bottom: 100rpx;
		}

		.box_pp {
			display: flex;
			align-items: flex-end;
			justify-content: center;
			color: #ffff00;
			// background-color: #ffff00;
			border-radius: 20rpx;
			font-size: 50rpx;
		}

		.box_num {
			// display: flex;
			// align-items: center;
			// justify-content: space-between;
			// flex-wrap: wrap;

			.num_i_nue {
				// width: 320rpx;
				margin: 10rpx 0;

				border-radius: 20rpx;
				padding: 10rpx;
				box-shadow: 0 0 20rpx rgba(255, 255, 0, 1.0);

				.text_top {
					background-color: rgba(255, 255, 0, 1.0);
					border-radius: 20rpx;

					.text {
						// margin-bottom: 10rpx;
						// display: flex;
						// justify-content: space-between;
						// align-items: center;

						// font-size: 30rpx;
						.text_fdlx {
							margin-top: 10rpx;
							padding: 0 10rpx;
							border-radius: 10rpx;
							display: flex;
							justify-content: space-between;
							align-items: center;
							background-color: rgba(255, 255, 0, 1.0);

							color: rgba(255, 255, 0, 1.0);

							.text_a {
								width: 100rpx;
								text-align: center;
								color: rgba(0, 0, 0, 0.8);
							}

							.text_b {
								width: 130rpx;
								border-radius: 5rpx;
								background-color: rgba(0, 0, 0, 1);
								text-align: center;
							}
						}

					}
				}

				.text_bom {
					// text-align: center;
					color: rgba(255, 255, 0, 1.0);
					font-size: 30rpx;
					// margin-bottom: 10rpx;
					display: flex;
					align-items: center;
					justify-content: space-between;

					.text_aaom {
						// color: rgba(0, 0, 0, 1.0);
					}

					.text_bbom {
						color: rgba(0, 0, 0, 1.0);
						border-radius: 5rpx;
						padding: 0rpx 10rpx;
						background-color: rgba(255, 255, 0, 1.0);
					}
				}
			}
		}

		.box_ff {
			margin: 20rpx 0;
			font-family: 'MyFont';
			font-size: 60rpx;
			color: rgba(255, 255, 0, 1.0);
			border-radius: 20rpx;
			border: 3rpx solid rgba(255, 255, 0, 1.0);
			padding: 10rpx;
			box-shadow: 0 0 20rpx rgba(255, 255, 0, 1.0);
		}

	}

	.measuring_box_details_acv {
		width: 700rpx;
		height: 1600rpx;
		overflow: auto;
		padding: 50rpx 30rpx 30rpx 30rpx;
		margin: 0 auto;
		background-color: #000000;

		.flx_butflx {
			display: flex;
			align-items: center;
			justify-content: space-between;
			margin-bottom: 100rpx;
		}

		.box_pp {
			display: flex;
			align-items: flex-end;
			justify-content: center;
			color: #00ff00;
			// background-color: #00ff00;
			border-radius: 20rpx;
			font-size: 50rpx;
		}

		.box_num {
			display: flex;
			align-items: center;
			justify-content: space-between;
			flex-wrap: wrap;

			.num_i_nue {
				width: 320rpx;
				margin: 10rpx 0;
				border-radius: 20rpx;
				border: 3rpx solid rgba(0, 255, 0, 1.0);
				padding: 10rpx;
				box-shadow: 0 0 20rpx rgba(0, 255, 0, 1.0);

				.text_top {

					.text {
						// margin-bottom: 10rpx;


						// font-size: 30rpx;
						.text_fdlx {
							margin-top: 10rpx;
							border: 2rpx solid rgba(0, 255, 0, 1.0);
							border-radius: 10rpx;
							display: flex;
							justify-content: space-between;
							align-items: center;

							.text_a {
								text-align: center;
								width: 100rpx;
								color: rgba(0, 255, 0, 1.0);
							}

							.text_b {
								width: 200rpx;
								border-radius: 5rpx;
								background-color: rgba(0, 255, 0, 1.0);
								color: #000000;
								text-align: center;
							}
						}

					}
				}

				.text_bom {
					// text-align: center;
					color: rgba(0, 255, 0, 1.0);
					font-size: 30rpx;
					// margin-bottom: 10rpx;
					display: flex;
					align-items: center;
					justify-content: space-between;

					.text_aaom {
						// color: rgba(0, 0, 0, 1.0);
					}

					.text_bbom {
						color: rgba(0, 0, 0, 1.0);
						border-radius: 5rpx;
						padding: 0rpx 10rpx;
						background-color: rgba(0, 255, 0, 1.0);
					}
				}
			}
		}

		.box_ff {
			margin: 20rpx 0;
			font-family: 'MyFont';
			font-size: 60rpx;
			color: rgba(0, 255, 0, 1.0);
			border-radius: 20rpx;
			border: 3rpx solid rgba(0, 255, 0, 1.0);
			padding: 10rpx;
			box-shadow: 0 0 20rpx rgba(0, 255, 0, 1.0);
		}

	}

	.tophead {
		display: flex;
		justify-content: space-between;
		align-items: center;
		padding: 60rpx 20rpx 10rpx 20rpx;
		color: #000000;
		background-color: #f3f3f3;
	}



	// 行走圈数
	.real_box {
		font-size: 40rpx;
		padding: 30rpx;
		margin: 20rpx 0;
		background-color: #fafafa;
		border-radius: 50rpx;
		border: 3rpx solid #fff;
		padding: 10rpx;
		box-shadow: 0 0 15rpx rgba(127, 127, 127, 0.2);

		.real_flx {
			display: flex;
			align-items: center;
			justify-content: space-between;
			color: #000000;

			.real_l {
				font-size: 45rpx;

				.buttn {
					padding: 15rpx;
					border-radius: 50rpx;
					display: flex;
					justify-content: space-around;
					align-items: center;
					background-color: #eabb5d;

					.img {
						width: 50rpx;
						height: 50rpx;
						// margin-right: 20rpx;
					}
				}
			}

			.real_l_a {
				font-size: 45rpx;

				.buttn {
					padding: 15rpx;
					border-radius: 50rpx;
					display: flex;
					justify-content: space-around;
					align-items: center;
					background-color: #52c8ab;

					.img {
						width: 50rpx;
						height: 50rpx;
						// margin-right: 20rpx;
					}
				}
			}

			.real_r {
				width: 260rpx;
				text-align: left;
				border-radius: 10rpx;
				padding: 10rpx;
				// font-family: 'MyFont';
				background-color: #000000;
				color: #ffcc65;
			}

			.real_r_r {
				width: 260rpx;
				border-radius: 10rpx 50rpx 50rpx 20rpx;
				padding: 10rpx 20rpx;
				// font-family: 'MyFont';
				background-color: #152024;
				color: #ffcc65;
			}

			.real_r_a {
				width: 260rpx;
				text-align: left;
				border-radius: 10rpx;
				padding: 10rpx;
				// font-family: 'MyFont';
				background-color: #000000;
				color: #33ff9e;
			}

			.real_r_a_r {
				width: 260rpx;
				border-radius: 20rpx 50rpx 50rpx 20rpx;
				padding: 10rpx 20rpx;
				background-color: #152024;
				color: #33ff9e;
			}
		}

		.text {
			margin: 20rpx auto;
			width: 450rpx;
			text-align: center;
			border-radius: 20rpx;
			background-color: #000000;
			color: #6eff42;

			.aa {
				font-size: 30rpx;
			}

			.bb {
				font-size: 40rpx;
				font-family: 'MyFont';
			}
		}
	}

	.custom-style {
		margin-top: 30rpx;
		background-color: #2f2f2f;
	}

	.text_top_dianf {
		// width: 320rpx;
		margin: 10rpx 0;
		background-color: rgba(53, 71, 0, 0.2);
		border-radius: 20rpx;
		border: 3rpx solid rgba(0, 255, 217, 1.0);
		padding: 10rpx;
		box-shadow: 0 0 20rpx rgba(0, 255, 217, 1);

		.text_bom {}

		.text_dianfa {
			// display: flex;
			// align-items: center;
			// justify-content: space-between;
			text-align: center;


		}

		.text_top {
			font-size: 45rpx;
			display: flex;
			align-items: center;
			justify-content: space-between;

			.text_a {
				color: rgba(0, 255, 255, 1.0);
				margin-left: 10rpx;
			}

			.text_dian_tit {
				width: 320rpx;
				display: flex;
				align-items: center;
				justify-content: space-between;
				color: rgba(157, 255, 0, 1.0);
			}

			.text_b {
				width: 150rpx;
				text-align: center;
				color: #000000;
				border-radius: 10rpx;
				background-color: rgba(0, 255, 255, 1.0);

			}
		}

	}

	.text_top_dianf_acv {
		// width: 320rpx;
		margin: 10rpx 0;
		background-color: rgba(127, 167, 185, 0.2);
		border-radius: 20rpx;
		border: 3rpx solid rgba(127, 167, 185, 0.8);
		padding: 10rpx;
		box-shadow: 0 0 20rpx rgba(127, 167, 185, 0.8);

		.text_bom {
			color: rgba(127, 167, 185, 0.8);
		}

		.text_dianfa {
			// display: flex;
			// align-items: center;
			// justify-content: space-between;
			text-align: center;

			.text_dian_tit {
				display: flex;
				align-items: center;
				justify-content: space-around;
			}
		}

		.text_top {
			font-size: 45rpx;
			display: flex;
			align-items: center;
			justify-content: space-between;

			.text_a {
				color: rgba(127, 167, 185, 0.8);
				margin-left: 10rpx;
			}

			.text_dian_tit {
				width: 320rpx;
				display: flex;
				align-items: center;
				justify-content: space-between;
				color: rgba(156, 175, 185, 0.8);
			}

			.text_b {
				width: 150rpx;
				text-align: center;
				color: #000000;
				border-radius: 10rpx;
				background-color: rgba(156, 175, 185, 0.8);

			}
		}

	}
</style>
<style>
	.u-picker__view__column__item {
		background-color: #cbe4ef !important;
	}

	.u-line-1 span {
		color: #000000;
		font-size: 50rpx;
	}

	page {
		background-color: #f3f3f3;
	}

	@font-face {
		font-family: 'MyFont';
		src: url('@/static/fonts/LED.otf');
	}

	@font-face {
		font-family: 'qingyuan';
		src: url('@/static/fonts/qingyuan.ttf');
	}
</style>